note 87697 added to function.date-timezone-set
| From: | Anonymous at osu1 dot php dot net | Date: | Wed, 17 Dec 2008 09:50:38 +0000 |
| Subject: | note 87697 added to function.date-timezone-set | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-148245@lists.php.net to get a copy of this message | ||
Note that this function will change the time accordingly.
<?php
$now = new DateTime('now', new DateTimeZone('UTC'));
echo $now->format('d F Y H:i:s e') . '<br />';
// => 17 December 2008 09:31:27 UTC
$taiwan = new DateTimeZone('Asia/Taipei');
$now->setTimezone($taiwan);
echo $now->format('d F Y H:i:s e') . '<br />';
// => 17 December 2008 17:31:27 Asia/Taipei
?>
----
Server IP: 140.112.2.5
Probable Submitter: 219.68.136.232
----
Manual Page -- http://www.php.net/manual/en/function.date-timezone-set.php
Edit -- https://master.php.net/note/edit/87697
Del: integrated -- https://master.php.net/note/delete/87697/integrated
Del: useless -- https://master.php.net/note/delete/87697/useless
Del: bad code -- https://master.php.net/note/delete/87697/bad+code
Del: spam -- https://master.php.net/note/delete/87697/spam
Del: non-english -- https://master.php.net/note/delete/87697/non-english
Del: in docs -- https://master.php.net/note/delete/87697/in+docs
Del: other reasons-- https://master.php.net/note/delete/87697
Reject -- https://master.php.net/note/reject/87697
Search -- https://master.php.net/manage/user-notes.php