-
Notifications
You must be signed in to change notification settings - Fork 93
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
#119: fix clock-triggering and restore local time usage #954
#119: fix clock-triggering and restore local time usage #954
Conversation
This fixes a few flaws in the way time zones are handled. It also fixes clock triggering (the motivation). At the moment, under the ISO 8601 cycling, all output and internal cycle times are in UTC by default. Cylc used to use local time, and this is really the 'normal' way to consider a non-zoned date/time. This change uses local time by default unless the UTC flag is set or a particular time zone is set. This implies that we need to set some time zone information in most of our reference tests - otherwise we will disagree on the results in the reference logs from location to location and from DST to not-DST. I thought about making UTC a default for reference tests, but it didn't seem quite right - and there are some tests that shouldn't be in UTC, including a new local time test and the clock triggering ones. This change also updates isodatetime to a newer version with better time zone assumptions (what a coincidence...).
(This needs to wait for metomi/isodatetime#43, really.) |
@benfitzpatrick - I've had a look through this, can't see any problems. But:
I'm taking this literally until advised otherwise! |
Updated, but needs another test-battery run through for peace of mind... |
OK, only the following tests fail for me now:
I've added auto-skipping above for some tests that I think don't matter. OK to review. |
|
Actually, looking at master, the retrying test appears to be doing the |
I'll assign this to @matthewrmshin for final review. |
@@ -322,6 +322,20 @@ def get_prev_point( self, p ): | |||
p_prev = p - self.i_step | |||
return self._get_point_in_bounds( p_prev ) | |||
|
|||
def get_nearest_prev_point(self, p): |
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.
p
not a good name.
Code change looks OK, apart from some minor style issues. I have 2 unexpected test failures, however:
|
Style issues addressed - please try re-running those tests with the updated branch. |
Now looking good. I now only have test failures in the 2 expected. |
#119: fix clock-triggering and restore local time usage
This fixes a few flaws in the way time zones are handled. It also
fixes clock triggering (the motivation).
At the moment, under the ISO 8601 cycling, all output and internal
cycle times are in UTC by default. Cylc used to use local time, and
this is really the 'normal' way to consider a non-zoned date/time.
It is also a more common representation in the ISO 8601 standard.
This change uses local time by default unless the UTC flag is set
or a particular time zone is set. This also affects input cycle
points that appear without time zones.
This implies that we need to set some time zone information in
most of our reference tests - otherwise we will disagree on the
results in the reference logs from location to location and from
DST to not-DST. I thought about making UTC a default for
reference tests, but it didn't seem quite right - and there are
some tests that shouldn't be in UTC, including a new local time
test and the clock triggering ones.
This change also updates isodatetime to a newer version with
better time zone assumptions (what a coincidence...).
[EDIT: also fixed sequential, fixed cylc-insert, shutdown/00-cycle,
restart/03-retrying, and added skipping for async-satellite and
one-off tests]
@hjoliver, please review.