MySQL Forums
Forum List  »  General

Convert_TZ
Posted by: Richard Creer
Date: December 05, 2018 08:48AM

My app is receiving date/times as UTC and storing them in a DATETIME field. Subsequently I want to display them to the client in his local time. I know his time zone.

So I’ve installed the time zone tables and to test I have today (early December 2019) run this query
SELECT CONVERT_TZ('2019-01-01 12:00:00', 'UTC', 'Europe/London')
It correctly returns '2019-01-01 12:00:00'.

If I then advance my PC’s date to, say, 1 May 2019 it still returns '2019-01-01 12:00:00' whereas I would have expected it to return '2019-01-01 13:00:00', ie. an hour on.

What am I doing wrong or not understanding?

Windows 7, MySQL 5.6

TIA

Options: ReplyQuote


Subject
Written By
Posted
Convert_TZ
December 05, 2018 08:48AM
December 05, 2018 11:52AM
December 06, 2018 07:30AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.