-
Notifications
You must be signed in to change notification settings - Fork 20
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
Set the local time zone as the default #43
Set the local time zone as the default #43
Conversation
Slightly altering this now to allow the assumption of any given time zone, not |
Now OK for review again. |
#42 change merged in and re-tested. |
@@ -139,12 +148,14 @@ class TimePointParser(object): | |||
def __init__(self, num_expanded_year_digits=2, | |||
allow_truncated=False, | |||
allow_only_basic=False, | |||
assume_utc=False, | |||
assumed_time_zone=None, | |||
no_assume_local_time_zone=False, |
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.
I'm having difficulty understanding what it is that this setting is relating to. I think the logic/naming convention mismatch here is unhelpful from a readability point of view. Could you change it to assume_local_time_zone
and flip logic accordingly, or something to that effect?
Overall looks technically sound. A few comments about naming and consistency for easy readability of code. |
Updated |
Shouldn't you be on holiday right now! |
My finger slipped |
Repeatedly and in all the "right" places to address my feedback. |
Looks good. Tests ok in my environment (apart from the length of time required to run them!). |
Set the local time zone as the default
This change allows the
TimePointParser
class to cast date/timerepresentations with unknown time zones into the local
time zone by default (although there are two switches,
assume_utc
andassume_unknown_time_zone
that switch offthis behaviour). Previously, they became UTC by default, which
goes against the spirit of the standard.
This change should be merged after #42.
@arjclark, please review.