php-general Digest 15 Apr 2013 17:14:22 -0000 Issue 8196

Topics (messages 320848 through 320848):

timezone
        320848 by: Larry Martell

Administrivia:

To subscribe to the digest, e-mail:
        php-general-digest-subscr...@lists.php.net

To unsubscribe from the digest, e-mail:
        php-general-digest-unsubscr...@lists.php.net

To post to the list, e-mail:
        php-gene...@lists.php.net


----------------------------------------------------------------------
--- Begin Message ---
I have a client that has an app the runs with PHP 5.1.6. They want to
upgrade to 5.3.3. First issue I ran into, they have a line of code
that is:

$deftz = date("T");

I'm getting this for that line:

[Mon Apr 15 10:44:16 2013] [error] [client 10.7.14.21] PHP Warning:
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/Denver' for
'MDT/-6.0/DST' instead in /home/www/itrade-dev/defs.inc on line 349

So I changed it to

$deftz = date.timezone;

and now I get:

[Mon Apr 15 10:49:35 2013] [error] [client 10.7.14.21] PHP Notice:
Use of undefined constant date - assumed 'date' in
/home/www/itrade-dev/defs.inc on line 349
[Mon Apr 15 10:49:35 2013] [error] [client 10.7.14.21] PHP Notice:
Use of undefined constant timezone - assumed 'timezone' in
/home/www/itrade-dev/defs.inc on line 349

Why is this undefined?

--- End Message ---

Reply via email to