js Date中的T和Z
- js Date中的T和Z 推荐度:
- 相关推荐
js Date中的T和Z
T表示后面开始的是time
Z表示时区0
2019-03-28T12:02:00Z表示的时格林尼治时间
2019-03-28T12:02:00表示的时当前时区的这个时间
var a = new Date('2019-03-28T12:02:00')
console.log(a)
Thu Mar 28 2019 12:02:00 GMT+0800 (中国标准时间)
var a = new Date('2019-03-28T12:02:00Z')
console.log(a)
Thu Mar 28 2019 20:02:00 GMT+0800 (中国标准时间)
如上,两个一样的时间,只是后面加了一个Z就导致了8个小时的时差
T表示后面开始的是time,跟空格一样
var a = new Date('2019-03-28T12:02:00Z')
console.log(a)
Thu Mar 28 2019 20:02:00 GMT+0800 (中国标准时间)var a = new Date('2019-03-28 12:02:00Z')
console.log(a)
Thu Mar 28 2019 20:02:00 GMT+0800 (中国标准时间)
最新文章
- 信雅达面试
- 什么是 Null Pointer Exceptions (java.lang.NullPointerException) ,是什么原因造成的?
- 各种int的取值范围
- linux启动停止重启MySQL的命令
- windows 2008虚拟机的安装方法
- n皇后问题回溯法
- 叶片杰伦恋夜语
- vss命令行的使用
- VSS详解
- Linux 磁盘管理
- Mac OS X下Adwaremalware 的简单手动排除方法
- 快速组合排列算法
- 最小二乘支持向量机(lssvm)回归预测(matlab)
- Idea 精准到类的打包方式:Artifacts 打包
- Python使用try...except...输出详细错误信息(比如报错具体位置在第几行)
- GUID MBR新一代分区表 DiskGenius
- 2022年执法资格刑侦执法考试多选题专项训练题及答案