[mythtv] Re: [mythtv-commits] Re: Ticket #723: MythTV should use UTC, not localtime for Dates Stored in the database

Bruce Markey bjm at lvcm.com
Fri Dec 2 13:10:33 EST 2005

MythTV wrote:
> #723: MythTV should use UTC, not localtime for Dates Stored in the database
> -------------------------------------------+--------------------------------
>  Reporter:  kevin.mythtv at atkinson.dhs.org  |        Owner:  ijr   
>      Type:  defect                         |       Status:  new   
>  Priority:  minor                          |    Milestone:        
> Component:  mythtv                         |      Version:  0.18.1
>  Severity:  medium                         |   Resolution:        
> -------------------------------------------+--------------------------------
> Comment (by anonymous):
>  The local time seems more meaningful, and the SQL functions and types like
>  NOW() use local time, so it is more convenient; it seems like a working
>  method of using localtime without making it impossible to handle schedules
>  near the changeover properly, would be to have a timezone column per row
>  to indicate which timezone the start and end time are in.

If you would like to learn about Linux, Unix or computers in
general, there are many good books available and resources on
the Internet as well as man pages installed on your system.

POSIX/Unix/Linux/etc. as well as MySQL store time in seconds
since midnight Jan 1, 1970. Libraries translate these times
for human display based on the configured timezone. Neither
MythTV nor MySQL choose a time zone but use the system env.
At least two people in the past have screwed up their listings
by moving the system to another time zone and only changing the
display clock time without actually changing the timezone.

To see this:

$ export TZ=GMT
$ mythfrontend
$ unset TZ

While mf is running, look at the EPG. The times are displayed
as if they were in Greenwich Mean Time.

--  bjm

More information about the mythtv-dev mailing list