-
Notifications
You must be signed in to change notification settings - Fork 11k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[5.3] validateDateFormat breaks on dates with timezones #16842
Comments
ping @rohitsubedi |
Please read https://en.wikipedia.org/wiki/ISO_8601 (the examples on the right, right at the top of the page
The PR introduced a bug. |
@mfn you have a fix? |
Better, a plan:
|
I don't think PHP considers it as valid, check http://php.net/manual/en/function.date.php
|
Nor does it what you would consider "the value" (tested with 7.0.14): >>> DateTime::createFromFormat("c", "1991-07-03T12:00:00+02:00")
=> false Probably something else going on with |
So it's a problem with PHP I guess, can you check the current implementation and if it can be done differently? It uses regular PHP functions, nothing custom.
…Sent from my iPhone
On Dec 17, 2016, at 7:07 PM, Markus Fischer ***@***.***> wrote:
Nor does it what you would consider "the value" (tested with 7.0.14):
>>> DateTime::createFromFormat("c", "1991-07-03T12:00:00+02:00")
=> false
Probably something else going on with createFromFormat and the c modifier.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Maybe this is related to the note in PHP docs http://php.net/manual/en/class.datetime.php#datetime.constants.iso8601
So you should use |
Steps To Reproduce:
This broke after #16692
Before:
The text was updated successfully, but these errors were encountered: