-
Notifications
You must be signed in to change notification settings - Fork 80
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
Make python timezone conversions handle more cases #5249
Conversation
py/server/deephaven/time.py
Outdated
|
||
# Try to get the time zone from the zone name | ||
try: | ||
return _JDateTimeUtils.parseTimeZone(str(tzi)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
datetime.tzinfo
is an abstract class, so I'm not sure str(tzi)
is guaranteed to be well-defined. It looks like tzinfo
does not define a method for string conversion, so you hope that the subclass does: https://github.com/python/cpython/blob/a76288ad9ba715216a29c89e046846b3eaf0fab7/Lib/_pydatetime.py#L1231
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Resolves #4723