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

Bad DST after 2038 #78

Open
dickermoshe opened this issue Jan 26, 2025 · 3 comments
Open

Bad DST after 2038 #78

dickermoshe opened this issue Jan 26, 2025 · 3 comments
Labels
bug Something isn't working

Comments

@dickermoshe
Copy link

final ianaTz = Timezone.timezoneProvider['America/New_York']!;
var dt = DateTime.parse('2038-03-14 03:00:00.000');
while (dt.year < 2050) {
  final ianaSpan = ianaTz.span(at: dt.microsecondsSinceEpoch);
  print(ianaSpan.offset);
  dt = dt.add(const Duration(minutes: 30));
}

The above will always print -5.
Before 2038 it all works great

@Pante Pante added bug Something isn't working and removed bug Something isn't working labels Jan 27, 2025
@Pante
Copy link
Member

Pante commented Jan 27, 2025

Seems like the timezone data is truncated after 2037. This can be either because IANA doesn't provide timezone data pass that yet or something related to the Year 2038 problem. I'm concerned since we internally use the timezone package to decode the zicfiles and might be an issue upstream.

EDIT:
Seems like thetimezone package has the same limitation. Checking https://tzexplorer.org/#/history reveals that there's timezone data until 2044 (unless the website is hallucinating but is very unlikely). So it's probably an upstream issue in timezone's zicfile parsing.

@dickermoshe
Copy link
Author

dickermoshe commented Jan 28, 2025

I contains data until 1800-2092, they only show until 2044

@dickermoshe
Copy link
Author

https://github.com/kshetline/tubular_time_tzdb#readme seems like a mature aina compiler which should be used instead of timezone.

I made major progress yesterday on the windows ffi implementation, working on unix today

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants