JavaScript

1.JavaScript时间戳的单位是毫秒,new Date().getTime()或者(new date()).valueOf()。

使用时间戳时要注意时区,如new Date(3600000).toLocaleString(),北京时间为1970-01-01 09.00.00,

在格林尼治则为1970-01-01 01.00.00

你可能感兴趣的:(JavaScript)