Bug #68204 [Opn->Dup]: getTimeStamp alters actual time stamp

From: Date: Mon, 18 May 2015 13:34:45 +0000
Subject: Bug #68204 [Opn->Dup]: getTimeStamp alters actual time stamp
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-192732@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=68204&edit=1 ID: 68204 Updated by: cmb@php.net Reported by: Octuro at gmail dot com Summary: getTimeStamp alters actual time stamp -Status: Open +Status: Duplicate Type: Bug Package: Date/time related Operating System: Ubuntu14.04 PHP Version: 5.5.17 -Assigned To: +Assigned To: cmb Block user comment: N Private report: N New Comment: Indeed, a duplicate of bug #63442. Previous Comments: ------------------------------------------------------------------------ [2015-02-17 22:30:10] dev dot anubis at gmail dot com Duplicate of #63442 ------------------------------------------------------------------------ [2014-10-10 07:19:55] Octuro at gmail dot com This particular date is during the BST to GMT switch over ------------------------------------------------------------------------ [2014-10-10 07:09:20] Octuro at gmail dot com 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" ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=68204&edit=1

« previous php.bugs (#192732) next »