Timestamp between Javascript and PHP

后端 未结 3 962
春和景丽
春和景丽 2020-12-15 04:43

Javascript:

I have object cell with something date

params.date = cell.getDate();
params.timestamp = cell.getDate().getTime() / 1000;
console.log(para         


        
3条回答
  •  轮回少年
    2020-12-15 05:24

    The UNIX Timestamp 1368028800 corresponds to the date Wed, 08 May 2013 16:00:00 GMT. In your example, you are on the China Standard Time (GMT+8), so Javascript display the datetime for this timezone (8 hours later -> 09 May)

提交回复
热议问题