Skip to content
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

Syntax explanations for ISO8601 #29

Open
sformel-usgs opened this issue Jan 26, 2024 · 0 comments
Open

Syntax explanations for ISO8601 #29

sformel-usgs opened this issue Jan 26, 2024 · 0 comments

Comments

@sformel-usgs
Copy link
Collaborator

What section of the best practices does your suggestion relate to?
Follow ISO 8601 for dates

Short description of content that should be revised
I've found an explanation from another resource (OGTA OBIS Training Course)which had a very clear explanation of the syntax, and perhaps should be included. @EliLawrence deserves the credit.

Suggested revision
ISO 8601 dates can represent moments in time at different resolutions, as well as time intervals.

  • Time intervals use / as a separator.
  • Date and times are separated by T.
  • Timezones can be indicated at the end by using + or - the number of hours offset from UTC.
  • If no timezone is indicated, then the time is assumed to be local time.
  • When a date/time is recorded in UTC, a Z should be added at the end.
  • Times must be written in the 24-hour clock system.
  • If you do not know the time, you do not have to provide it.
  • Do not indicate unknown times as “00:00” as this indicates midnight.

Not every piece of time information is necessary, but a generalization of how to format dates and times looks like:

YYYY-MM-DDT[hh]:[mm]:[ss] [+/-XX OR Z]

Some specific examples of acceptable ISO 8601 dates are:

Dates:

1948-09-13
1993-01/02
1993-01
1993

Dates with Specific Times:

1973-02-28T15:25:00
2008-04-25T09:53

Dates with Time Zones:

2005-08-31T12:11+12
2013-02-16T04:28Z

Date and Time Intervals:

1993-01-26T04:39+12/1993-01-26T05:48+12

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant