【发布时间】:2019-05-14 07:40:56
【问题描述】:
我的表中有数据,其中一列是 DATETIME。
select time from tbdt where unix_timestamp(time) > unix_timestamp(now()) order by time asc limit 1
现在 NodeJS 在 console.log() 中打印错误的时间,例如,
实际日期时间是2018-12-16 15:00:00 在数据库表中..
但是mysql返回2018-12-16T09:30:00.000Z
相差 5 小时 30 分钟,我的时区是 +5:30 (IST)
我不知道哪里出错了,不管是在 MySql 中还是在 Node Js 中
【问题讨论】: