|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2014-10-10 07:19 UTC] Octuro at gmail dot com
[2015-02-17 22:30 UTC] dev dot anubis at gmail dot com
[2015-05-18 13:34 UTC] cmb@php.net
-Status: Open
+Status: Duplicate
-Assigned To:
+Assigned To: cmb
[2015-05-18 13:34 UTC] cmb@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Dec 13 02:00:01 2025 UTC |
Description: ------------ PHP 5.5.9-1ubuntu4.4 (cli) (built: Sep 4 2014 06:56:34) Copyright (c) 1997-2014 The PHP Group Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies with Zend OPcache v7.0.3, Copyright (c) 1999-2014, by Zend Technologies DISTRIB_ID=Ubuntu DISTRIB_RELEASE=14.04 DISTRIB_CODENAME=trusty DISTRIB_DESCRIPTION="Ubuntu 14.04.1 LTS" Test script: --------------- $objDateTime = new \DateTime("26 October 2014 00:15:00 +0000"); $objDateTime->setTimeZone(new \DateTimeZone('UTC')); var_dump($objDateTime->format("d F Y H:i:s O")); $objDateTime->setTimeZone(new \DateTimeZone('Europe/London')); var_dump($objDateTime->format("d F Y H:i:s O")); var_dump($objDateTime->getTimeStamp()); var_dump($objDateTime->format("d F Y H:i:s O")); Expected result: ---------------- string(30) "26 October 2014 00:15:00 +0000" string(30) "26 October 2014 01:15:00 +0100" int(1414282500) string(30) "26 October 2014 01:15:00 +0100" Actual result: -------------- string(30) "26 October 2014 00:15:00 +0000" string(30) "26 October 2014 01:15:00 +0100" int(1414286100) string(30) "26 October 2014 01:15:00 +0000"