Repository navigation
Conversation
…ant in An offset is not a zone. The offset in start/end is the consequence of a zone at one instant: +02:00 is both Europe/Amsterdam and Africa/Johannesburg, and Amsterdam's own offset differs either side of a DST boundary. So the zone cannot be recovered from a stored event, and an application that wants to re-render an event in the zone it was scheduled in -- or place a recurrence correctly once the clocks change -- has nowhere to read it from. The field is optional and additive: a reader that does not know it is unaffected, and an event without it is exactly as valid as before. Raised because the schema is additionalProperties:false, so writing this privately would make the envelopes fail strict validation instead of extending the schema -- the honest route is here.
Contributor
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CalendarEvent(880e8400-e29b-41d4-a716-446655440099) hasstart,endandisAllDay, but no way to say which zone the wall clock was meant in. This adds one optional string. It is additive and changes nothing for existing readers or existing events.An offset is not a zone
The obvious objection is that
start/endalready carry an offset, so a zone is redundant. It is not, in two directions:+02:00is Europe/Amsterdam and Africa/Johannesburg alike. From a stored event you cannot get back to the zone.+02:00in July and+01:00in January. The offset is the consequence of a zone at one instant.So the offset answers "what instant", and only a zone answers "what did the person mean, and what will they mean next year". Two things need the latter:
CalendarEventhas no recurrence field today, which is exactly why this matters now rather than later: the value is lost at every write, so when recurrence does arrive there will be nothing to reconstruct it from, while the envelopes will still be there.Why this is a pull request and not a private field
The schema is
"additionalProperties": false. Meshenger has been writingtimezoneonto it, which does not extend the schema — it makes our envelopes fail strict validation. Writing it privately is the thing to avoid: two applications inventing their own name for the same fact is how a shared schema splits. So the field comes here, where every other calendar application gets it too, under one name.This is the same route as #1183 (
File: optionalwidth/height), for the same reason.Shape
Optional
string, holding an IANA zone name (Europe/Amsterdam). Deliberately not an enum — the IANA database changes, and a schema that enumerates zones is wrong the next time a country redefines one. A reader that does not recognise the name should fall back to the offset instart, which is unchanged and still correct.Discussed with the DigitalSelf platform before opening, which is where the "lost at every write" argument came from.