1

I store all the dates in my database as UTC. This to stay consistent and avoid confusion when my application would be used by different countries.

Sometimes I need to convert to my local timezone Europe/Brussels though.

select CONVERT_TZ('2021-08-13 14:40:55', '+00:00', 'Europe/Brussels') from sale;

Returns NULL.

So I tried

select CONVERT_TZ('2021-08-13 14:40:55', '+00:00', '+01:00') from sale;

Which does work, but still returns the wrong time. The European Union - for some ridiculous reason - still has a 'Daylight Saving Time' resulting in one hour being added during the summer.

How would I handle that?

O'Niel
  • 1,622
  • 1
  • 17
  • 35
  • no it is added in spring and removed in autumn somertime began this year 27. March and ends at 31 October – nbk Aug 13 '21 at 16:05
  • Does this answer your question? [MySQL CONVERT\_TZ()](https://stackoverflow.com/questions/2523286/mysql-convert-tz) – nbk Aug 13 '21 at 16:13

0 Answers0