-
Notifications
You must be signed in to change notification settings - Fork 18
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
DateOnly data example is not compatible to RFC 3339, section 5.6 #190
Comments
From https://github.com/swisspush/apikana/blob/develop/src/model/ts/default-types.ts:
The example is only 'yyyy-mm-dd' without time zone and this not compatible to RFC 3339, section 5.6. |
Ah :) I missed that. We've a DateOnly not a DateTime as I thought. (Edit: BTW: If a type representing "date-time" (eg including date, time and offset) is wanted, DateTime could be used which contains everything needed. this type would cover the full type of the named RFC) Unluckily with DateOnly I guess the situation gets a bit trickier I think :| Originally "DateOnly" was clearly defined to be the "full-date" part named in the linked spec. (See older default-types.ts). This way, the format "YYYY-mm-dd" even is the only valid format. As its definition was unmistakable (cited from RFC):
So there's neither timezone nor offset information involved in the "full-date" type. I've no idea why this detail got dropped from Apikana doc somewhen later. Nevertheless I think the remaining question is: What is the correct way to store a DateOnly but including offset information. Actually I don't know such a format. We usually only use "DateTime" even we're not interested in the time part. This might be the reason we never stumbled over this yet. |
DateOnly is precisely meant to refer to a date and not a point in time (datetime). The timezone is irrelevant. |
DateOnly is not compliant with RFC 3339, section 5.6, because the time zone is missing. It is not clear at what moment the change from one day to another happens.
The text was updated successfully, but these errors were encountered: