note 97724 added to datetime.construct

From: Date: Wed, 05 May 2010 10:50:14 +0000
Subject: note 97724 added to datetime.construct
Groups: php.notes 
Request: Send a blank email to php-notes+get-168955@lists.php.net to get a copy of this message
"The $timezone parameter and the current timezone are ignored when the $time parameter […] is a UNIX timestamp." Watch out – this means that these two are NOT equivalent, they result in different timezones (unless your current timezone is GMT): $d = new DateTime(); $d->setTimestamp($t); echo $o->format('O'); // +0200 $d = new DateTime('@' . $t); echo $o->format('O'); // +0000 ---- Server IP: 69.147.83.197 Probable Submitter: 194.25.133.14 ---- Manual Page -- http://www.php.net/manual/en/datetime.construct.php Edit -- https://master.php.net/note/edit/97724 Del: integrated -- https://master.php.net/note/delete/97724/integrated Del: useless -- https://master.php.net/note/delete/97724/useless Del: bad code -- https://master.php.net/note/delete/97724/bad+code Del: spam -- https://master.php.net/note/delete/97724/spam Del: non-english -- https://master.php.net/note/delete/97724/non-english Del: in docs -- https://master.php.net/note/delete/97724/in+docs Del: other reasons-- https://master.php.net/note/delete/97724 Reject -- https://master.php.net/note/reject/97724 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#168955) next »