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

Inconsistent behavior for dates on the edges of time overlaps #403

Closed
dkhalanskyjb opened this issue Jul 8, 2024 · 0 comments · Fixed by #404
Closed

Inconsistent behavior for dates on the edges of time overlaps #403

dkhalanskyjb opened this issue Jul 8, 2024 · 0 comments · Fixed by #404
Assignees
Labels
timezone The model and API of timezones
Milestone

Comments

@dkhalanskyjb
Copy link
Collaborator

dkhalanskyjb commented Jul 8, 2024

A time overlap is when one clock reading occurs in several instants. For example, in New York, on 2023-11-05T02:00, clocks are shifted to 2023-11-05:01:00, so 2023-11-05T01:15 occurs twice.

The question is, does 2023-11-05T02:00 occur twice in New York? Our own system does not provide a consistent answer. Whenever we are querying historical data, the answer is no, 2023-11-05T02:00 only exists after the overlap. However, when querying the recurring rules, 2023-11-05T02:00 is considered to exist twice: just before the clocks shifted and after the time overlap.

If we treat TimeZone as a reified function (Instant) -> LocalDateTime, the answer is clear: since only one Instant maps to 2023-11-05T02:00 in New York, this local date-time is not in an overlap, so the behavior of the recurring rules should be fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
timezone The model and API of timezones
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant