note 73174 added to function.date-default-timezone-set
| From: | PeerGoal dot com at osu1 dot php dot net | Date: | Mon, 12 Feb 2007 12:21:36 +0000 |
| Subject: | note 73174 added to function.date-default-timezone-set | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-123274@lists.php.net to get a copy of this message | ||
The problem:
date() [function.date]: It is not safe to rely on the system's timezone settings. Please use
the date.timezone setting, the TZ environment variable 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
'PST/-8.0/no DST' instead
Of course this is a problem that recently surfaced since PHP5. Quick fix is to set your time zone,
add this line to your php code:
date_default_timezone_set("America/Los_Angeles");
----
Server IP: 203.121.145.99
Probable Submitter: 125.24.243.0
----
Manual Page -- http://www.php.net/manual/en/function.date-default-timezone-set.php
Edit -- https://master.php.net/note/edit/73174
Del: integrated -- https://master.php.net/note/delete/73174/integrated
Del: useless -- https://master.php.net/note/delete/73174/useless
Del: bad code -- https://master.php.net/note/delete/73174/bad+code
Del: spam -- https://master.php.net/note/delete/73174/spam
Del: non-english -- https://master.php.net/note/delete/73174/non-english
Del: in docs -- https://master.php.net/note/delete/73174/in+docs
Del: other reasons-- https://master.php.net/note/delete/73174
Reject -- https://master.php.net/note/reject/73174
Search -- https://master.php.net/manage/user-notes.php