-
Notifications
You must be signed in to change notification settings - Fork 14
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
Datetime: Add explicit examples of valid datetime parameters #342
Comments
This is a good point, but I am somewhat confused about how we should address this. The intent is that the Common requirement is as permissive as possible compared to any other OGC API standards that may want to declare a dependency on it. The
I somehow assumed all this time that Features only requires the server to support understanding There was a decision limit timezones to In fact, our implementation of Features was certified as passing all tests with only support for However, it seems that you are right that RFC3339 allows support for specifying times in any time zones. Is Features missing Abstract Tests (which guide the ETS development) to catch implementations like ours that are not implementing support for alternate time zones ? Or should the requirements about In addition to Features and Common, we have the exact same |
When we specified If we would specify In general, ATS tests are not super specific (CQL2 is different with its very detailed test cases). If we add tests for various kinds of timezones, we would also have to add tests for many other variations (e.g., years like "0001", nanoseconds, leap second cases, leap years, invalid values like "2024-02-31", etc.). Typically, this level of detail is added in the ETS. We can have a look at that in the version 1.1 revision, too. |
How would developers read such recommendation? Probably like "Usually the times will come with Z, but also time offsets may appear, and you must handle them somehow". I would like to see something that is explicit. Full RFC3339 support with Z and offsets is explicit. I believe that it is also possible to write an unambiguous definition for the UTC-only case. For example, we could stick with RFC3339, but define a profile that allows only Could it be handled with requirement classes?
|
Implementations of Features Core that conform to the standard will always have to support time zones other than UTC. Everything else would be a breaking change. The recommendation would target clients and recommend to use "Z", because that reduces the variations and all implementations likely will support "Z". It would not be a formal recommendation in the document as the standardization target are servers, not clients. |
Where in the OGCFeat Core that is written in an unambiguous way? Perhaps https://docs.ogc.org/is/17-069r4/17-069r4.html#_parameter_datetime where we can read a line "The syntax of date-time is specified by RFC 3339, 5.6." Would it be a breaking change to the style we are using when writing the standards to say clearly what we mean? Like "A server SHALL support datetimes with time zone offsets. Server SHALL deny local times". |
@jratike80 I agree that clear requirements results into clear abstract tests which results in clear ETS which results in clearly conforming implementations. Now we have our implementation certified while it is actually not conforming correctly, and this same confusion has proliferated to other standards -- I will work on a fix for Maps, Coverages and DGGS at least. What I would suggest for these and for Common is to say something like:
And a permission that says:
Regarding breaking change, I think what @cportele is saying is that it would be breaking clients to relax the requirement to support date time with time zone offsets. It would not be a breaking change in a Features update to clearly state:
I really do believe Abstract Tests cases need to be added for the different cases that need to be supported.
In practice, I don't believe this is really the case. |
@jratike80 We've clarified this with in Common with @joanma747 in Montreal last week, and those changes are also reflected in Maps, DGGS and Coverages: What this says:
This should not break OGC API - Features, where the expectation is the servers always need to support local time offsets (although the ATS / ETS do not explicitly test for that). |
This clarifies the matter. It leaves still some oddities especially into OGC API Features. The service must support local time offsets in parameter "datetime", but local time offsets cannot be in used in filter, at least when the query-lang is cql2, because CQL2 supports only UTC times. How about the clients? Are they also required to support time offsets? If the client is requesting |
The target of the OGC APIs are the servers, so technically the clients can do whatever they want :) In terms of the server response, there is the |
As written now, the reader must conclude that because RFC 3339 applies, then the timezones must be supported in datetime. There is also a line in https://docs.ogc.org/DRAFTS/20-024.html#date-time-bnf-annex that supports this interpretation.
I suggest to make the time zone offset requirement clear in the standard text. The right place might be https://docs.ogc.org/DRAFTS/20-024.html#datetime-parameter-requirements
Note that by RFC 3339 the datatime parameter must have either a "Z" suffix (
1996-12-20T00:39:57Z
) or an offset from the UTC time (1996-12-19T16:39:57-08:00
). Datetimes without timezone ("local time" in ISO 8601) are not allowed.A general set of requirements which all implementations must address should include the requirement to deal correctly with the offsets. And finally, some of the examples about datetimes should contain offsets. Now all of them are using the Zulu time.
Some other OGC standards (GeoPackage, JSON-FG) explicitly do not allow time zone offsets. It would reduce the confusion to emphasize that when a standard refers to common, then the support for time zones is compulsory.
The text was updated successfully, but these errors were encountered: