[mythtv-users] OT mysql datetime

Nicolas Krzywinski myth at site7even.de
Wed Apr 29 19:17:52 UTC 2015


Am 29.04.2015, 06:30 Uhr, schrieb <mythtv-users-request at mythtv.org>:

> Message: 20
> Date: Wed, 29 Apr 2015 00:51:30 +0200
> From: Hika van den Hoven <hikavdh at gmail.com>
> To: Discussion about MythTV <mythtv-users at mythtv.org>
> Subject: Re: [mythtv-users] OT mysql datetime
> Message-ID: <1899275079.20150429005130 at gmail.com>
> Content-Type: text/plain; charset=windows-1252
>Hoi Nicolas,
>Thanks, as I wrote in my second post, I found something in the manual.
> I still have to read further into the details.
> From http://dev.mysql.com/doc/refman/5.6/en/datetime.html
>" The TIMESTAMP and (as of MySQL 5.6.5) DATETIME data types offer
> automatic initialization and updating to the current date and time.
> For more information, see Section 11.3.5, ?Automatic Initialization
> and Updating for TIMESTAMP and DATETIME?.
>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?.
>Tot mails,
>   Hika
This is extremely interesting - something worth to find a neat place to store somewhere deep in one's synapse labyrinth... ;-)
Thanks for sharing it with us! :)

-- 
www.nskcomputing.de


More information about the mythtv-users mailing list