PHP :: Bug #76727 :: Bug About IntlDateFormatter
php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #76727 Bug About IntlDateFormatter
Submitted: 2018-08-10 06:34 UTC Modified: 2018-08-14 12:51 UTC
From: conkay at foxmail dot com Assigned:
Status: Not a bug Package: intl (PECL)
PHP Version: 7.1Git-2018-08-10 (Git) OS: All
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: conkay at foxmail dot com
New email:
PHP Version: OS:

 

 [2018-08-10 06:34 UTC] conkay at foxmail dot com
Description:
------------
The class IntlDateFormatter gives the wrong result, it affects the time from 00:00 AM to 01:00 AM in any timezone. Mybe other versions have the same bug.

Test script:
---------------
$time = strtotime("2018-08-10 04:00:00 UTC");
date_default_timezone_set("America/New_York");
echo date('Y-m-d H:i:s', $time), "\n";
$formatter = \IntlDateFormatter::create("en_US", NULL, NULL, "America/New_York");
echo $formatter->format($time), "\n";

Expected result:
----------------
2018-08-10 00:00:00
Friday, August 10, 2018 at 00:00:00 AM Eastern Daylight Time

Actual result:
--------------
2018-08-10 00:00:00
Friday, August 10, 2018 at 12:00:00 AM Eastern Daylight Time


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2018-08-11 15:24 UTC] a at b dot c dot de
Midnight *is* 12:00 AM....
 [2018-08-14 01:54 UTC] conkay at foxmail dot com
I got it.
Thanks you.
 [2018-08-14 01:55 UTC] conkay at foxmail dot com
-Status: Open +Status: Closed
 [2018-08-14 01:55 UTC] conkay at foxmail dot com
It's not a bug.
 [2018-08-14 12:51 UTC] ab@php.net
-Status: Closed +Status: Not a bug
 
PHP Copyright © 2001-2018 The PHP Group
All rights reserved.
Last updated: Fri Aug 17 18:01:26 2018 UTC