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

Require DateTimes to be in UTC (...Z) #105

Open
kaestli opened this issue Dec 16, 2021 · 2 comments
Open

Require DateTimes to be in UTC (...Z) #105

kaestli opened this issue Dec 16, 2021 · 2 comments
Labels

Comments

@kaestli
Copy link

kaestli commented Dec 16, 2021

In the current XSD, times are just defined as xsd:datetime.
While in many local stationXML documents, fdsn/station responses, no time zone is given and seismologists may implicitly assume that times are in UTC, the XMLSchema standard actually says on the data type xsd:datetime:
"If no time zone value is present, it is considered unknown; it is not assumed to be UTC." - times with unknown timezones are not very useful for the user.
Moreover: The character strings allowed in xsd:datatimes (e.g. 2004-04-12T13:20:00) look like ISO 8601-formatted time strings. However, ISO 8601 says: "If no UTC relation information is given with a time representation, the time is assumed to be in local time." - if a client interprets such a time without time zone e.g. using the standard java implementation of ISO 8601 time parsing, (s)he will get a time object with the time zone according to the locale of his machine.

To avoid these ambiguities I would suggest that all times should be given in UTC explicitly, and hence all time stamps have a respective zone mark ("...Z")

@kaestli kaestli changed the title Require times to be in UTC (...Z) Require DateTimes to be in UTC (...Z) Dec 16, 2021
@chad-earthscope
Copy link

I agree, the time zone should be explicit.

@kaestli By what mechanism would it be enforced in the schema?

@crotwell
Copy link
Collaborator

see #12 discussion and for possible schema change to do this

see also #54 for documentation issue

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

Successfully merging a pull request may close this issue.

3 participants