-
-
Notifications
You must be signed in to change notification settings - Fork 2
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
New Release & FFI #76
Comments
Sure! I'll be honest I'm surprised that there's people using Sugar. I'll probably skip 2024 and use the 2025 version.
Do you mean retrieving the TZ databases from the OS? I think having an option to do that would be awesome but I'm not too sure how difficult it will be. |
I'm having a blast writing the FFI for it. However, windows doesn't contain a full IANA database, so it won't be possible to add it to this package without breaking changes. I'm going to add this to the Also, because things in this package are int UintList to save space, it's hard to wrap my head around what goes where. This is a great paackage, I'll try to add it here after. (A Nested header widget wont show a title if a leading or trailing widget aren't provided tho. Too lazy to open a bug report) |
Ah I think breaking changes are totally fine! The next slated release is actually Sugar 4.0.0 which introduces a couple of breaking changes, a few more won't hurt. The UintList will probably change in the new release as I completely overlooked dart2js not supporting longs natively. |
Also windows contains NO historical data |
So i guess the ransition list is not super acurate |
Perhaps it might make sense to default to the baked-in tzdb if the OS's tzdb cannot be found or something similar. |
This means that windows thinks that there was DST in the USA in the year 1700. |
This is more than just a breaking change in terms of syntax. |
Seems that sugar is the only library which even attempts to handle in-between DTS transitions, gonna work on this repo |
Some issues near the transition point, but I think I've got it working! |
@Pante After the year 2038, DST is permanently set. 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));
} This will always print -5 hours. |
Timezones have changed in the past 19 months
@Pante Can we get another release?
Additionally, would you be interested in a PR which would get Timezones from the system using FFI.
Having to update software whenever the tz databases changes is a big pain.
On the other hand, sugar works on devices that don't get system updates.
The text was updated successfully, but these errors were encountered: