-
Notifications
You must be signed in to change notification settings - Fork 36
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
Date.Extra.Format.isoString isn't parsable in Safari. #29
Comments
Sounds eminently reasonable. Hmm but the default isn't using it for some reason. I'll look into this next time I am in code base. |
That would be perfect - if I have some time and beat you to it, I'll do a PR as well. |
@rluiten I just did a fresh install of my project, and it looks like the ":" is back in the timezone - was this fixed? |
I have not updated the lib yet. |
Oh, I see, I had a bug in my code, which was also affected by this missing ":". |
I am about to publish this change to include : in |
fix(Format): isoMsecOffsetFormat now defaults to %:z format to include colon in string, which seems a more general solution. See #29 for context. style(Internal): removed some left over Debug.log.
I'm building an elm app that builds a
Date.Date
from two different sources, and gets the local timezone to submit to a server in an iso8601 format. To extract the local timezone, I was originally doing:Later, I combine my date and time parts with this local timezone and do a
Date.fromString
which I'm guessing backs onto javascript's Date implementation. This works perfectly fine in Chrome and Firefox, but Safari throws an error saying the date I assembled isn't a proper 8601 format.After some fiddling, I discovered Safari would only accept a timezone if it was formatted with a
:
between the hour and minute, ie1999-01-01T12:00:00-05:00
.Would it be possible to have
isoString
output with that format, as it can be parsed on all browsers usingDate.fromString
from elm's core packages.The text was updated successfully, but these errors were encountered: