note 44346 deleted from function.date by tomsommer

From: Date: Wed, 21 Jul 2004 16:48:30 +0000
Subject: note 44346 deleted from function.date by tomsommer
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-73832@lists.php.net to get a copy of this message
Note Submitter: kop@meme.com ---- The only way to be _certain_ you're getting a valid human-readable UTC time value out of date() is to cache the timestamp, like so: $t=time; // Produce a OpenLDAP timestamp value, UTC time. $utc_time = date ('YmdHis', $t - date('Z', $t)) . 'Z'; Otherwise if daylight savings time ticks over between the determination of the current time and the determination of the current UTC offset your result will be off by 2 hours! It's easier to use gmdate().

« previous php.notes (#73832) next »