Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: MythTV: Users

mythweb timezone being set wrong

 

 

MythTV users RSS feed   Index | Next | Previous | View Threaded


davemccloskey at gmail

Jul 22, 2012, 9:08 PM

Post #1 of 2 (334 views)
Permalink
mythweb timezone being set wrong

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


mtdean at thirdcontact

Jul 23, 2012, 5:40 AM

Post #2 of 2 (313 views)
Permalink
Re: mythweb timezone being set wrong [In reply to]

On 07/23/2012 12:08 AM, David McCloskey wrote:
> 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?

It only checks the value "once in a while" (once a day or so, IIRC), so
after moving to a new time zone, you'll need to wait a while to pick up
the new zone.

Mike
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-users

MythTV users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.