Using PHP to Match a Javascript Timestamp

后端 未结 3 1068
面向向阳花
面向向阳花 2021-01-23 04:25

Alright when I do the code:


You get the Unix t

3条回答
  •  清歌不尽
    2021-01-23 04:56

    If you don't need (millisecond) presision, then just divide & Math.floor the javascript's function. So:

    time();
    

    and

    Math.floor((new Date).getTime()/1000)
    

    should return the same value at the same time.

提交回复
热议问题