1

I try to convert timezones from local format to UTC that works fine except in one case. At the day of conversion (27.03 02:00:00) and only when going from GMT+1 to GMT+2.
(The conversion back is at 30.10 at 03:00:00)

OK -> SELECT CONVERT_TZ('2016-03-27 01:59:59','Europe/Vienna','UTC');
GMT +1 = 00:59:59

BUG -> SELECT CONVERT_TZ('2016-03-27 02:00:01','Europe/Vienna','UTC');
GMT +2 = 01:00:00

Here the bug occurs, from 02:00:00 when its the time of conversion to 02:59:59, the hour doesn't convert and each given minute and second is ignored...

That means:
02:00:00 -> 01:00:00
02:00:01 -> 01:00:00
02:59:59 -> 01:00:00

at 03:00:00 the conversion is okay again...
OK -> SELECT CONVERT_TZ('2016-03-27 03:00:00','Europe/Vienna','UTC');
GMT +2 = 01:00:00

any ideas or experiences with this bug?

true_gler
  • 544
  • 6
  • 23
  • 1
    You're passing in local times that don't exist. I suggest you avoid doing that. (The local time would go 01:59:58, 01:59:59, 03:00:00... so asking what UTC time a local time of 02:00:00 maps to is a meaningless question.) – Jon Skeet Nov 30 '16 at 10:45
  • http://stackoverflow.com/questions/40877950/web-and-database-server-settings-to-get-utc-timezone-right/40878011#40878011 – e4c5 Nov 30 '16 at 10:47
  • somehow obvious! thanks! – true_gler Nov 30 '16 at 11:25
  • Possible duplicate of [Web and Database server settings to get UTC timezone "right"](http://stackoverflow.com/questions/40877950/web-and-database-server-settings-to-get-utc-timezone-right) – fedorqui Jan 20 '17 at 09:54

0 Answers0