-
Notifications
You must be signed in to change notification settings - Fork 57
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
Type for each timezone #30
Comments
chrono-tz should support this. |
+1 |
Yes, this would be extremely useful. The following simple use case is, as best as I can tell, impossible: use chrono::DateTime;
use chrono_tz::US::Eastern;
struct Foo {
create_time: DateTime<Eastern>,
} As best as I can tell, it is only feasible to store DateTimes in Utc/FixedOffset/Local in a struct. |
This would also provide dead-code elimination, so only data for time zones that are actually used would be included. Important for binary sizes on embedded. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This feature was removed in #1. While I understand the reason for needing a single type that can dynamically represent different time zones, a project I'm currently working on needs to statically mark a value as being in a specific timezone:
This is because the timestamps I'm deserializing are not marked with any timezone but the documentation specifies that they are to be interpreted as local times in Germany (and that no DST-ambiguous timestamps occur).
It would be great if this library could support both use-cases.
The text was updated successfully, but these errors were encountered: