php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #73596 IntlDateFormatter fails to parse valid dates
Submitted: 2016-11-23 22:41 UTC Modified: 2021-06-23 12:00 UTC
Votes:4
Avg. Score:4.0 ± 1.0
Reproduced:4 of 4 (100.0%)
Same Version:2 (50.0%)
Same OS:1 (25.0%)
From: thomas dot lallement at 9online dot fr Assigned: cmb (profile)
Status: Not a bug Package: intl (PECL)
PHP Version: 7.1.0RC6 OS: Ubuntu / Red Hat
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 you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: thomas dot lallement at 9online dot fr
New email:
PHP Version: OS:

 

 [2016-11-23 22:41 UTC] thomas dot lallement at 9online dot fr
Description:
------------
You can follow this link to see the current issue that is relevant on all version of php (even in 7.0.x or 7.1.0-RC6):

https://3v4l.org/GZlSs

The fact is that given the Timezone, the parsing can fail on different dates. The following code is used by Symfony Framework in a data transformer (DateTimeToLocalizedStringTransformer) that is used to parse date enter in Date and DateTime fields.

https://github.com/symfony/symfony/issues/20593

Test script:
---------------
https://3v4l.org/GZlSs


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2021-01-12 17:48 UTC] cmb@php.net
-Status: Open +Status: Feedback -Assigned To: +Assigned To: cmb
 [2021-01-12 17:48 UTC] cmb@php.net
This might be an upstream issue.  Have you file a bug report there?
 [2021-01-12 20:15 UTC] thomas dot lallement at 9online dot fr
-Status: Feedback +Status: Assigned
 [2021-01-12 20:15 UTC] thomas dot lallement at 9online dot fr
What do you mean by upstream issue?
 [2021-01-12 20:29 UTC] cmb@php.net
-Status: Assigned +Status: Open -Assigned To: cmb +Assigned To:
 [2021-01-12 20:29 UTC] cmb@php.net
I'm referring to ICU - International Components for Unicode:
<http://site.icu-project.org/home>.
 [2021-06-23 12:00 UTC] cmb@php.net
-Status: Open +Status: Not a bug -Assigned To: +Assigned To: cmb
 [2021-06-23 12:00 UTC] cmb@php.net
Actually, this is not a bug.  The dates that failed to parse are
dates on which a DST shift happened for Europe/Malta, and the
clock was forwarded from 00:00 to 01:00, so 00:00 doesn't exist.
Use lenient mode if you have to process such dates.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu Mar 13 21:01:32 2025 UTC