CONVERT_TZ in MySQL



我如何将其与以下代码一起使用,以抵消+1小时的DST:

SELECT datetime 
FROM events 
WHERE datetime > NOW() 
GROUP BY datetime 
ORDER BY datetime

从我在互联网上看到的各种例子中,我不太清楚我是如何做到这一点的,比如:

SELECT CONVERT_TZ(datetime,'+00:00','+01:00')

干杯!

试试这个:

SELECT CONVERT_TZ(datetime,'+00:00','+01:00') as conv_dt
FROM events
WHERE datetime > NOW() 
GROUP BY conv_dt 
ORDER BY conv_dt;

相关内容

  • 没有找到相关文章

最新更新