note 70965 deleted from ref.datetime by danbrown
| From: | danbrown@php.net | Date: | Wed, 20 May 2009 02:45:59 +0000 |
| Subject: | note 70965 deleted from ref.datetime by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-155773@lists.php.net to get a copy of this message | ||
Note Submitter: mikeb at tracersinfo dot com
----
Another month late on this, but I would amend alex's post to recommend using gmdate() any time
you're trying to represent a "delta time", or your local timezone is likely to
interfere.
For example, a five minute difference (300 seconds) would appear as follows in New York:
echo date('z:H:i:s', 300);
// 364:19:05:00
echo gmdate('z:H:i:s', 300);
// 0:00:05:00
Thanks for the 'z', though, Alex. Up until now, I've always been dividing that out
-- hadn't found it in the format list. :-)