note 70965 added to ref.datetime

From: Date: Mon, 06 Nov 2006 19:27:35 +0000
Subject: note 70965 added to ref.datetime
Groups: php.notes 
Request: Send a blank email to php-notes+get-119437@lists.php.net to get a copy of this message
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. :-) ---- Server IP: 64.71.164.2 Probable Submitter: 24.129.132.130 ---- Manual Page -- http://www.php.net/manual/en/ref.datetime.php Edit -- https://master.php.net/note/edit/70965 Del: integrated -- https://master.php.net/note/delete/70965/integrated Del: useless -- https://master.php.net/note/delete/70965/useless Del: bad code -- https://master.php.net/note/delete/70965/bad+code Del: spam -- https://master.php.net/note/delete/70965/spam Del: non-english -- https://master.php.net/note/delete/70965/non-english Del: in docs -- https://master.php.net/note/delete/70965/in+docs Del: other reasons-- https://master.php.net/note/delete/70965 Reject -- https://master.php.net/note/reject/70965 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#119437) next »