MySQL中的CONVERT_TZ

时间:2013-07-29 13:24:10

标签: mysql datetime dst convert-tz

我如何使用以下代码与+ 1hr抵消DST:

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

我无法从互联网上看到的各种例子中弄清楚我是如何做到的,例如:

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

干杯!

1 个答案:

答案 0 :(得分:0)

试试这个:

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