note 114630 added to function.strtotime
| From: | a dot dyudyun at gmail dot com | Date: | Fri, 14 Mar 2014 07:21:35 +0000 |
| Subject: | note 114630 added to function.strtotime | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-198888@lists.php.net to get a copy of this message | ||
<?php
# strtotime() function with param "now" work only with UTC
# time zone (GMT) Grinvich, but param "midnight" work with
# local time zone
date_default_timezone_set("Europe/Kiev");
echo "Kiev:".strtotime("now");
echo "<br><br>";
date_default_timezone_set("America/New_York");
echo "New-York:".strtotime("now");
echo "<br><br>";
date_default_timezone_set("UTC");
echo "UTC:".strtotime("now");
echo "<br>==========================<br>";
date_default_timezone_set("Europe/Kiev");
echo "Kiev:".strtotime("midnight");
echo "<br><br>";
date_default_timezone_set("America/New_York");
echo "New-York:".strtotime("midnight");
echo "<br><br>";
date_default_timezone_set("UTC");
echo "UTC:".strtotime("midnight");
echo "<br><br>";
?>
result:
Kiev:1394781415
New-York:1394781415
UTC:1394781415
==========================
Kiev:1394748000
New-York:1394769600
UTC:1394755200
----
Server IP: 72.52.91.14
Probable Submitter: 46.227.139.234
----
Manual Page -- http://php.net/manual/en/function.strtotime.php
Edit -- https://master.php.net/note/edit/114630
Del: integrated -- https://master.php.net/note/delete/114630/integrated
Del: useless -- https://master.php.net/note/delete/114630/useless
Del: bad code -- https://master.php.net/note/delete/114630/bad+code
Del: spam -- https://master.php.net/note/delete/114630/spam
Del: non-english -- https://master.php.net/note/delete/114630/non-english
Del: in docs -- https://master.php.net/note/delete/114630/in+docs
Del: other reasons-- https://master.php.net/note/delete/114630
Reject -- https://master.php.net/note/reject/114630
Search -- https://master.php.net/manage/user-notes.php