-
-
Notifications
You must be signed in to change notification settings - Fork 769
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
"toString" format not working properly with 12 hour clock #155
Comments
Good find! |
this syntax returns nil Is this the same bug or related? |
You have provided the wrong format according to your date string in the comment. |
So to get this straight, the DateFormat should match the date string provided? I thought it was the format based on which the Date is returned. |
The |
@netgfx coming back to your question: you must know the date format of the string you provide before passing it on. How you obtain that is your challenge. |
Yes I understand now and I was able to convert the given date to a custom formatted one. |
Woops reopened since the original bug with ISO8601 date formatting in the default region is still prevailing. |
I think we should reuse same function to express same features. In this way |
I think we should consolidate to a minimum number of functions that describe the function of the function. In this case I would vote for the |
Totally agree. It now uses toString(.ISO8601) format but it's marked as deprecated. 9451ed3 |
I have a date
2016-02-06 18:39:00 UTC
(in variabledate
). When I dodate.inRegion().toISO8601String()
, I get the correct output:2016-02-06T18:39:00.000Z
. But when I do simply:date.toString(.ISO8601)
, what I get is something unexpected and possibly a wrong value:2016-02-06T7:39:00+0100
. Am I using it wrongly or is it a bug? Thanks.The text was updated successfully, but these errors were encountered: