[mythtv-users] mythweb timezone being set wrong

David McCloskey davemccloskey at gmail.com
Mon Jul 23 04:08:58 UTC 2012


For some reason, my backend is reporting my timezone as New_York when it
should be Los_Angeles (I recently moved).  In classes/MythBackened.php, it
sets the timezone using date_default_timezone_set
to $_SESSION['backend']['timezone']['value'] which is "America/New_York".
 This, despite the fact that my backend (which is on the same machine) is
returning PDT date from "date" and /etc/localtime and /etc/timezone are
updated to reflect America/Los_Angeles.  Where is my backend getting the
idea of New_York, so I can change it?

Other oddity (maybe related?), I create a brand new foo.php with only the
following in the same directory as my mythweb and it gives the error about
date.timezone not being set even though it is. Is something in the apache
config for mythweb making that be ignored?  The phpinfo() information says
it's reading the file.  A separate folder with a phpinfo behaves normally
(no errors/warnings and LA timezone).

foo.php:
<?php echo date_default_timezone_get(); ?>
<?php echo date("r"); ?>
<?php phpinfo(); ?>

result of foo.php:
*Warning*: date_default_timezone_get()
[function.date-default-timezone-get<http://myth.tv.akwire.net:8080/function.date-default-timezone-get>]:
It is not safe to rely on the system's timezone settings. You are
*required* to use the date.timezone setting or the
date_default_timezone_set() function. In case you used any of those methods
and you are still getting this warning, you most likely misspelled the
timezone identifier. We selected 'America/Los_Angeles' for 'PDT/-7.0/DST'
instead in */home/mythweb/public_html/foo.php* on line *1*
America/Los_Angeles
*Warning*: date()
[function.date<http://myth.tv.akwire.net:8080/function.date>]:
It is not safe to rely on the system's timezone settings. You are
*required* to use the date.timezone setting or the
date_default_timezone_set() function. In case you used any of those methods
and you are still getting this warning, you most likely misspelled the
timezone identifier. We selected 'America/Los_Angeles' for 'PDT/-7.0/DST'
instead in */home/mythweb/public_html/foo.php* on line *2*
Sun, 22 Jul 2012 21:06:15 -0700



-- 
Dave McCloskey
davemccloskey at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mythtv.org/pipermail/mythtv-users/attachments/20120722/9ad2063f/attachment.html>


More information about the mythtv-users mailing list