mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-01 11:39:28 +08:00
docs: update docs about timezone
This commit is contained in:
parent
59805843e5
commit
2dc5b11c43
@ -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')
|
||||
|
@ -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')
|
||||
|
Loading…
Reference in New Issue
Block a user