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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
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-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 09:01:27 2024 UTC