Reputation: 810
I was using tz_convert() function from MySQL and I am getting Null.
Is this normal. I was reading that is bug ?
SELECT CONVERT_TZ('2004-01-01 12:00:00','PST','UTC') as date;
Upvotes: 1
Views: 154
Reputation: 15351
Using timezone or location names in MySQL convert_tz() is dependant on how the system timezone database is configured. If you know the offsets, pass them in '+00:00' format instead of tz names. That should work regardless of the system configuration. E.g.
SELECT CONVERT_TZ('2004-01-01 12:00:00','-08:00','+00:00') as date;
Upvotes: 1