Accept ISO-8601 short time offset format#5015
Merged
Merged
Conversation
alexcjohnson
approved these changes
Jul 24, 2020
Contributor
Author
|
Thanks for your review 👍 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#1194 supports ISO8601 timestamp format.
lib/dates.jssays it supports the ISO8601 time zone format.In fact it supports the RFC3339 time offset format, not ISO8601.
time offset format of RFC3339 is:
https://tools.ietf.org/html/rfc3339#section-5.6
It always needs minutes.
In contract, ISO8601 time offset format can abbreviate minute if minute is 00.
https://en.wikipedia.org/wiki/ISO_8601#Time_offsets_from_UTC
I noticed this problem while converting PostgreSQL response into chart.
Plotly.js does not allow the date and time output from PostgreSQL.
Example of datetime string from PostgreSQL:
1997-12-17 07:37:16-08(minute of time offset is abbreviated)https://www.postgresql.org/docs/12/datatype-datetime.html#DATATYPE-DATETIME-OUTPUT