Bug #73712 [Opn->Ver]: DateTime::format returns wrong result

From: Date: Sat, 10 Dec 2016 19:12:12 +0000
Subject: Bug #73712 [Opn->Ver]: DateTime::format returns wrong result
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-205900@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=73712&edit=1 ID: 73712 Updated by: cmb@php.net Reported by: navkal at hotmail dot com Summary: DateTime::format returns wrong result -Status: Open +Status: Verified Type: Bug Package: Date/time related Operating System: Ubuntu 16.04, Windows 10 PHP Version: 7.0.14 Block user comment: N Private report: N New Comment: Confirmed for some timezones: <https://3v4l.org/Ntilo>. Previous Comments: ------------------------------------------------------------------------ [2016-12-10 18:42:02] navkal at hotmail dot com Description: ------------ Used DateTime::format to format the following input: 3/11/2012 2:00 Expected result: 03/11/2012 02:00 Actual result: 03/11/2012 03:00 Observed in the following environments: - Windows 10: XAMPP, PHP 7.0.9 - Ubuntu: PHP Version 7.0.8-0ubuntu0.16.04.2 Test script: --------------- $input = "3/11/2012 2:00"; $dt = new DateTime( $input ); $output = $dt->format( "m/d/Y H:i" ); echo( "$input => $output <br/>" ); Expected result: ---------------- 03/11/2012 02:00 Actual result: -------------- 03/11/2012 03:00 ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=73712&edit=1

« previous php.bugs (#205900) next »