note 31375 deleted from function.time by irchtml

From: Date: Wed, 25 Feb 2004 14:41:10 +0000
Subject: note 31375 deleted from function.time by irchtml
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-65732@lists.php.net to get a copy of this message
Note Submitter: schickb@hotmail.com ---- The 10-Apr-2003 comment about time() not actually returning seconds in GMT is incorrect. The time() function does indeed return seconds since 1-1-1970 GMT (which is a typical unix timestamp). I checked this by calling time() on machines in several different time zones, and they all returned the same value. The commenter was probably confused because the date() function converts GMT timestamps to local time. If you want to see the non-adjusted GMT date for a timestamp, use the gmdate() function. You can verify this yourself by passing a timestamp of 0 to both date() and gmdate(). You will find that gmdate() always returns "1-1-1970 " while date() adjusts for your local offset.

« previous php.notes (#65732) next »