Skip to content

Add MySQL Column type TIMESTAMP by extending DateTime.#18

Open
shazahm1 wants to merge 1 commit intoiron-bound-designs:masterfrom
shazahm1:issue/17
Open

Add MySQL Column type TIMESTAMP by extending DateTime.#18
shazahm1 wants to merge 1 commit intoiron-bound-designs:masterfrom
shazahm1:issue/17

Conversation

@shazahm1
Copy link
Contributor

@TimothyBJacobs
Copy link
Member

This might be a bit more tricky.

MySQL converts TIMESTAMP values from the current time zone to UTC for storage, and back from UTC to the current time zone for retrieval. (This does not occur for other types such as DATETIME.) By default, the current time zone for each connection is the server's time. The time zone can be set on a per-connection basis. As long as the time zone setting remains constant, you get back the same value you store. If you store a TIMESTAMP value, and then change the time zone and retrieve the value, the retrieved value is different from the value you stored. This occurs because the same time zone was not used for conversion in both directions. The current time zone is available as the value of the time_zone system variable. For more information, see Section 10.6, “MySQL Server Time Zone Support”.

From, https://dev.mysql.com/doc/refman/5.5/en/datetime.html.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants