[mythtv] [mythtv-commits] Ticket #5791: Allow time zone ID's whose to differ by space/underscore

Michael T. Dean mtdean at thirdcontact.com
Thu Oct 9 08:15:04 UTC 2008


On 10/09/2008 03:26 AM, Simon Kenyon wrote:
> On Wed, 2008-10-08 at 19:15 -0400, Michael T. Dean wrote:
>   
>> /etc/timezone is used on Debian-based systems (and they're the only ones 
>> I know of that use it).  It should be a text file that contains a single 
>> line with the name of the file (relative to the top directory of the 
>> zoneinfo database) with the name of the file used to set the time zone 
>> rules.  I.e. in your case, it should contain "Eire".
>>
>> /etc/sysconfig/clock on a Red Hat-based system should contain a line:
>> ZONE=Eire
>>
>> However, the code we have would prevent /etc/sysconfig/clock from being 
>> interpreted if it's a binary file, so as Janne indicated, it seems you 
>> have an invalid (from the Debian perspective) /etc/timezone.  I think 
>> Janne is currently working on adding code to ignore invalid /etc/timezone.
>>     
>
> as they say "close, but no cigar"
>
> google tells me that /etc/timezone can also be a link to a file
> in /usr/share/zoneinfo on debian

Ref?  It seems a waste to make /etc/timezone a link to the zoneinfo 
rules file when /etc/localtime is a link to or copy of the zoneinfo 
rules file (and /etc/localtime is "universal," so it will be there on a 
Debian system).

According to 
http://www.debian.org/doc/manuals/system-administrator/ch-sysadmin-time.html#s16.1 
and http://wiki.debian.org/TimeZoneChanges /etc/timezone is a file with 
the name of the timezone.  And, the tzconfig program on Debian writes 
the name of the zone to the /etc/timezone file.  (See 
https://www.cs.drexel.edu/cgi-bin/manServer.pl/tzconfig.8 )

There is a file, /etc/TIMEZONE (which is not /etc/timezone) that is 
often a link, but it's generally used on Solaris and is a link to 
/etc/default/init (which contains environment variable initialization, 
including the initialization of the TZ environment variable).  So even 
it is not a link to a zoneinfo rules file.

Regardless, the changes that went in will ignore an /etc/timezone whose 
contents (or whose linked file's contents) are binary.  That 
means--assuming there's no /etc/sysconfig/clock file--myth will now use 
/etc/localtime to determine the time zone ID if /etc/timezone is binary.

Mike


More information about the mythtv-dev mailing list