且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何从 MySQL 中的日期时间中减去小时数?

更新时间:2023-08-18 09:21:28

mySQL 具有 DATE_SUB():

mySQL has DATE_SUB():

SELECT DATE_SUB(column, INTERVAL 3 HOUR)....

但是尝试解决潜在的时区问题不是更好吗?

but would it not be better to try and sort out the underlying time zone issue instead?