Skip to content

Commit 847ab27

Browse files
authored
Update date_timestamp_convert.md
1 parent ca8244f commit 847ab27

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

date_timestamp_convert.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,23 @@
11
# 时间转换
22

33
Unix时间戳,是从1970年1月1日(UTC/GMT的午夜)开始所经过的秒数,不考虑闰秒。
4+
协调世界时UTC,又称世界统一时间、世界标准时间、国际协调时间。
45

5-
时间戳格式: 1606986993 (当前)
6-
基本时间格式: YYYY-MM-DD HH:mm:ss
6+
YYYY-MM-DD HH:mm:ss
7+
YYYY-MM-DDTHH:mm:ss.sssZ
8+
9+
基本时间格式: 2020-12-04 18:53:33
10+
UTC时间格式: 2020-12-04T10:53:33.776Z (ISO-8601)
11+
Unix时间戳格式: 1606986993 (当前为10位数字)
712

813

9-
Unix时间戳,是从1970年1月1日(UTC/GMT的午夜)开始所经过的秒数,不考虑闰秒。
1014

1115
## javascript:
1216

1317
js 使用 `new Date().getTime()`获取时间戳,返回值的单位是毫秒。
1418

19+
ISO-8601 ,格式为: YYYY-MM-DDTHH:mm:ss.sssZ
20+
1521
浏览器 console:
1622

1723
```sh

0 commit comments

Comments
 (0)