|   | php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
| 
 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits              [2007-12-07 09:59 UTC] derick@php.net
  [2008-01-17 18:52 UTC] derick@php.net
 | |||||||||||||||||||||||||||
|  Copyright © 2001-2025 The PHP Group All rights reserved. | Last updated: Fri Oct 31 18:00:01 2025 UTC | 
Description: ------------ When creating a DateTime from a timestamp (i.e. date('r)) it will report the TimeZone of the environment it was created in and not the timezone in the timestamp. Reproduce code: --------------- <?php date_default_timezone_set("Etc/GMT+1"); $datetime = new DateTime('Fri, 07 Dec 2007 19:05:14 +1000'); echo $datetime->getTimezone()->getName(), "\n"; Expected result: ---------------- Etc/GMT-10 Actual result: -------------- Etc/GMT+1