diff --git a/components/date-picker/index.en-US.md b/components/date-picker/index.en-US.md index e0338dac2b..54221954ed 100644 --- a/components/date-picker/index.en-US.md +++ b/components/date-picker/index.en-US.md @@ -20,6 +20,8 @@ import moment from 'moment-timezone/moment-timezone'; // It's recommended to set locale and timezone in entry file globaly. import 'moment/locale/zh-cn'; moment.locale('zh-cn'); + +// Set timezone if you need it. // The following data is copied from https://github.com/moment/moment-timezone/blob/develop/data/packed/latest.json moment.tz.add('Asia/Shanghai|CST CDT|-80 -90|01010101010101010|-1c1I0 LX0 16p0 1jz0 1Myp0 Rb0 1o10 11z0 1o10 11z0 1qN0 11z0 1o10 11z0 1o10 11z0|23e6'); moment.tz.setDefault('Asia/Shanghai') diff --git a/components/date-picker/index.zh-CN.md b/components/date-picker/index.zh-CN.md index 74d281909f..100d4c6672 100644 --- a/components/date-picker/index.zh-CN.md +++ b/components/date-picker/index.zh-CN.md @@ -21,6 +21,8 @@ import moment from 'moment-timezone/moment-timezone'; // 推荐在入口文件全局设置 locale 与时区 import 'moment/locale/zh-cn'; moment.locale('zh-cn'); + +// 按需设置时区 // 从 https://github.com/moment/moment-timezone/blob/develop/data/packed/latest.json 复制 moment.tz.add('Asia/Shanghai|CST CDT|-80 -90|01010101010101010|-1c1I0 LX0 16p0 1jz0 1Myp0 Rb0 1o10 11z0 1o10 11z0 1qN0 11z0 1o10 11z0 1o10 11z0|23e6'); moment.tz.setDefault('Asia/Shanghai')