-
Notifications
You must be signed in to change notification settings - Fork 116
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
Time formats should be more consistent and portable across platforms #487
Time formats should be more consistent and portable across platforms #487
Comments
@OriHoch Totally agree. This is an example where limiting choice probably benefits everyone (data authors, consumers, and developers). I'd suggest dropping formats
In other words, either you know the time zone and convert to UTC (and tag with "Z"), or you don't know the time zone (and drop the "Z"). |
@ezwelty @OriHoch this was a classic trade-off of supporting publishers in describing data as is vs a desirable strictness for consumers. Remember the specs have to balancing supporting publishers who may be publishing data they don't control and making it easier for tool writers to use the spec. I'm not sure we've yet got the trade-off right for date formats but what i would say is you see a lot of variety in date formats in the wild (think of what you see in google spreadsheets or excel as options). We want to support that as we can because many publishers may be constrained to use that. At the same time I get that this is problematic for consumers and tool authors and that what we have there may not yet be specific enough. My request here would be see what we can do with v1 as is and consider revisions for v1.1 based on more experience in the wild. |
given this constraint, I would suggest the following for v1.1:
|
@OriHoch ok, good idea. Let's come back to this when we start working on the v1.1 release. |
This may also help infer formats frictionlessdata/tableschema-js#98 |
As a data publisher, I strongly support Rufus Pollock's comment above. I would like to see time zone support added for ISO8610 formats e.g. 2016-12-25T00:01:01Z+10 |
@Stephen-Gates Probably a typo, but just in case: It's difficult to implement the entire ISO 8601 spec, but I think it'd be reasonable to extend the list I suggested above (#487 (comment)) with support for non UTC ('Z') time zone designators ±hh:mm, ±hhmm, and ±hh. |
Thanks @ezwelty. Including the Z is my mistake. |
From @stevage: "date"/default allows any ISO8601 format, which is incredibly broad (and includes rarely supported features like recurring dates and intervals). Do we intend this? From Rufus: @pwalsh i agree we should restrict date to yyyy-mm-dd[+T stuff +TZ stuff] strictly. wdyt. |
From @peterdesmet Frictionless Framework will correctly parse the following datetimes with a 2013-11-23T08:30:00 # No timezone
2013-11-23T08:30:00Z # UTC time
2013-11-23T06:30:00-0200 # Timezone offset This is great! But according to the specs only UTC times should be supported (excluding offsets or no timezone):
Is the more broad support intentional? Should the specs be updated to drop the Originating issue: tdwg/camtrap-dp#333 |
🙌 |
the specs currently support formats for time/date formats which are not portable and might produce different results when called from different platforms / library implementations:
I think we should drop the additional format and support only the ISO standard format
Another option - support only a small subset of strptime, and validate that only that subset is used.
The text was updated successfully, but these errors were encountered: