-
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
Human readable names of the time-zones. #6
Comments
Hm, yes this seems like something that could be provided |
Sounds like a good idea. However, don't the abbreviations change depending on DST, e.g. CDST and CDT? |
musically-ut
added a commit
to musically-ut/chrono-tz
that referenced
this issue
Mar 26, 2017
djc
pushed a commit
that referenced
this issue
Apr 15, 2024
Handle negative offsets, "Alternative" parsing error and comment lines
djc
pushed a commit
that referenced
this issue
Apr 15, 2024
Improve build time by turning off regex cargo features
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Printing the TimeZone in debug mode (i.e. using
{:?}
formatter) shows a correct name of the zone but that does not seem like a kosher way of arriving at the names.I couldn't find another way. Since the
Tz
is anenum
, it cannot provide an attribute like.name
(re: #1). Also, providing a.to_string()
(i.e. implementing aDisplay
trait), is tricky because a time-zone can have several names depending on the context, e.g. bothAsia/Kolkata
andIST
can be seen as expected outputs of.to_string()
.Perhaps the
Debug
implementation can be moved to a functionget_name
which returns aString
and then implementation ofDebug
could be:What do you think?
The text was updated successfully, but these errors were encountered: