MySQL Forums
Forum List  »  Newbie

Re: Mysql ADDTIME can it do this ? Daylight savings time issue
Posted by: Peter Brawley
Date: November 06, 2011 09:48PM

Doesn't seem quite the right approach. From http://dev.mysql.com/doc/refman/5.1/en/news.html:

The current session time zone setting affects display and storage of time values that are zone-sensitive. This includes the values displayed by functions such as NOW() or CURTIME(), and values stored in and retrieved from TIMESTAMP columns. Values for TIMESTAMP columns are converted from the current time zone to UTC for storage, and from UTC to the current time zone for retrieval.

The current time zone setting does not affect values displayed by functions such as UTC_TIMESTAMP() or values in DATE, TIME, or DATETIME columns. Nor are values in those data types stored in UTC; the time zone applies for them only when converting from TIMESTAMP values. If you want locale-specific arithmetic for DATE, TIME, or DATETIME values, convert them to UTC, perform the arithmetic, and then convert back.

PB

Options: ReplyQuote


Subject
Written By
Posted
Re: Mysql ADDTIME can it do this ? Daylight savings time issue
November 06, 2011 09:48PM


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.