note 100220 added to function.time
| From: | TimoK at osu1 dot php dot net | Date: | Sat, 02 Oct 2010 12:49:44 +0000 |
| Subject: | note 100220 added to function.time | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-172884@lists.php.net to get a copy of this message | ||
The documentation should have this info. The function time() returns always timestamp that is
timezone independent (=UTC).
date_default_timezone_set("UTC");
echo "UTC:".time();
echo "<br>";
date_default_timezone_set("Europe/Helsinki");
echo "Europe/Helsinki:".time();
echo "<br>";
Local time as string can be get by strftime() and local timestamp (if ever needed) by mktime().
----
Server IP: 80.81.171.181
Probable Submitter: 84.249.77.207
----
Manual Page -- http://www.php.net/manual/en/function.time.php
Edit -- https://master.php.net/note/edit/100220
Del: integrated -- https://master.php.net/note/delete/100220/integrated
Del: useless -- https://master.php.net/note/delete/100220/useless
Del: bad code -- https://master.php.net/note/delete/100220/bad+code
Del: spam -- https://master.php.net/note/delete/100220/spam
Del: non-english -- https://master.php.net/note/delete/100220/non-english
Del: in docs -- https://master.php.net/note/delete/100220/in+docs
Del: other reasons-- https://master.php.net/note/delete/100220
Reject -- https://master.php.net/note/reject/100220
Search -- https://master.php.net/manage/user-notes.php