note 60159 added to function.gmdate

From: Date: Wed, 28 Dec 2005 13:35:42 +0000
Subject: note 60159 added to function.gmdate
Groups: php.notes 
Request: Send a blank email to php-notes+get-100847@lists.php.net to get a copy of this message
If you have the same application running in different countries, you may have some troubles getting the local time.. In my case, I was having troubles with a clock created with Macromedia Flash... the time shown by the clock was supposed to be set up by the server, passing the timestamp. When I moved the file to another country, I got a wrong time... You can use the timezone offset ( date("Z") ) to handle this kind of thing... <?php $timestamp = time()+date("Z"); echo gmdate("Y/m/d H:i:s",$timestamp); ?> ---- Manual Page -- http://www.php.net/manual/en/function.gmdate.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+60159 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+60159&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+60159&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+60159&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+60159&report=yes&reason=useless Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+60159&report=yes&reason=non-english Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+60159&report=yes&reason=already+in+docs Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+60159&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+60159&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#100847) next »