[mythtv] [mythtv-commits] Ticket #5896: Allow NIS-format /etc/timezone

Michael T. Dean mtdean at thirdcontact.com
Sat Jan 3 15:30:54 UTC 2009


On 01/02/2009 05:23 PM, MythTV wrote:
> #5896: Allow NIS-format /etc/timezone
>
> Comment(by otto at kolsi dot fi):
>
>  I have similar problem with freshly installed trunk on Fedora 10. In the
>  machine /etc/sysconfig/clock contains:
>  {{{
>  # The ZONE parameter is only evaluated by system-config-date.
>  # The time zone of the system is defined by the contents of
>  /etc/localtime.
>  ZONE="Europe/Helsinki"
>  }}}
>   

Do you have an /etc/timezone file?  If so, what are its contents?  We 
check /etc/timezone first--even on Red-Hat-based systems--because we 
really don't know what type of system is in use.

>  Error in MythWeb is:
>  {{{
>  Failed to set php timezone to U
>  }}}
>
>  Running the Perl script gives:
>  {{{
>  $ ./myth_timezone.pl
>  Use of uninitialized value $name in concatenation (.) or string at
>  ./myth_timezone.pl line 44.
>   

You would need to use the myth_time_zone.pl script (the myth_timezone.pl 
test script was "obsoleted" when I found out that time zone is actually 
2 words, not one, and changed the protocol command to QUERY_TIME_ZONE).  
Or, if you have any remote backends, you can find out what time zone is 
in use in the remote backend's log file (assuming -v important is 
enabled, which is in the default).  It should say:

Backend is running in <something> time zone.

Though it's likely to say "U"...  The interesting thing is whether it 
says anything more or less than it should (i.e. due to garbage it pulled 
from a file).

>  Current Timezone
>    offset: UNKNOWN_COMMAND
>      name:
>  }}}
>
>  Tried to apply Sphery's attached patch but it doesn't seem to fix the
>  issue for me.

You don't have an /etc/timezone that's a link to/copy of a file in 
/usr/share/zoneinfo, do you?  I.e. does:

file -L /etc/timezone

give you:

/etc/timezone: timezone data

If so, even though I cannot figure out why /anyone/ would ever have 
this, I'll write some code to check for the tzdata file type before 
looking at /etc/timezone, since it would be the second time someone had 
that configuration.  (Though I'd really expect it to be using a timezone 
of TZif(+garbage), if that were the case.)

Thanks,
Mike


More information about the mythtv-dev mailing list