timezone

From: Date: Mon, 15 Apr 2013 17:14:17 +0000
Subject: timezone
Groups: php.general 
Request: Send a blank email to php-general+get-320848@lists.php.net to get a copy of this 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?

« previous php.general (#320848) next »