note 87698 added to function.date-timezone-set
| From: | augustin at osu1 dot php dot net | Date: | Wed, 17 Dec 2008 10:09:05 +0000 |
| Subject: | note 87698 added to function.date-timezone-set | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-148246@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:51:04 UTC.
$taiwan = new DateTimeZone('Asia/Taipei');
$now->setTimezone($taiwan);
echo $now->format('d F Y H:i:s e') . '<br />';
// => 17 December 2008 17:51:04 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/87698
Del: integrated -- https://master.php.net/note/delete/87698/integrated
Del: useless -- https://master.php.net/note/delete/87698/useless
Del: bad code -- https://master.php.net/note/delete/87698/bad+code
Del: spam -- https://master.php.net/note/delete/87698/spam
Del: non-english -- https://master.php.net/note/delete/87698/non-english
Del: in docs -- https://master.php.net/note/delete/87698/in+docs
Del: other reasons-- https://master.php.net/note/delete/87698
Reject -- https://master.php.net/note/reject/87698
Search -- https://master.php.net/manage/user-notes.php