[mythtv-users] Mythweb timezone question

Michael T. Dean mtdean at thirdcontact.com
Sat Nov 12 17:14:00 UTC 2011


On 11/12/2011 11:12 AM, Andrey Zhunev wrote:
> After recent daylight saving time switch, I'm having an issue with
> MythWeb time being one hour earlier than it should be.

What do you mean by this?

> The time I see in mythfrontend is correct though, so it's something
> mythweb / php related.
>
> Reading through the mailing list, I found that the 'date.timezone'
> parameter of php.ini needs to be properly configured.
>
> I have changed mine to:
>
> date.timezone = Etc/GMT+4

You almost certainly don't want this one--you want:

date.timezone = Europe/Moscow

although Etc/GMT+4 has the same time right this minute as as 
Europe/Moscow, they have had different times over the years.  Using 
Etc/GMT+4 (and such) is basically equivalent to just setting your clock 
to local time--which will break MythTV because MythTV needs to know the 
current time offset /and/ the offset for every point in the past (since 
you started using MythTV) and in the future (for as long as you continue 
to use MythTV).

In other words, Etc/GMT+4 is /not/ the same as Europe/Moscow.

To prove this:

/usr/sbin/zdump -v /usr/share/zoneinfo/Etc/GMT+4 > plus4
/usr/sbin/zdump -v /usr/share/zoneinfo/Europe/Moscow > mos
diff plus4 mos

Notice the many times during which they differed (basically they were 
the same (at least according to zoneinfo's records) before 1916, but 
haven't been since--and I'm guessing that at least some of your MythTV 
usage has been in the period since they differed  ;).

> which should be correct for my area (Moscow, Russia). But it didn't
> change MythWeb behavior. I also tried a "Etc/GMT+5" (just in case...)
> - without any success.
>
> I restarted httpd (and even the machine completely) - but it didn't
> help.
>
>
> What else should I check?

That said, MythWeb requests the current time zone from the master 
backend system and then applies whatever time zone is set on the master 
backend (because the important thing is that all MythTV hosts agree on 
the rules for applying offsets, not just on the current offset).  
Therefore, date.timezone isn't used (unless you're using a really old 
MythTV).

So, the question is, what you mean by, "MythWeb time being one hour 
earlier than it should be"?  Do you mean the time shown in the upper 
left of MythWeb pages?  Do you mean the recordings and/or listings are 
shown with the wrong start/end time?  Or what?

Mike


More information about the mythtv-users mailing list