Conversation
|
@hjoliver, this PR removes a code block that isn't used any more. Can you have a quick look at it and merge if ok. |
|
@hjoliver ping |
| if custom_time_zone_info is not None: | ||
| custom_hours = custom_time_zone_info["hours"] | ||
| custom_minutes = custom_time_zone_info["minutes"] | ||
| if use_basic_format: | ||
| custom_string = custom_time_zone_info["string_basic"] | ||
| else: | ||
| custom_string = custom_time_zone_info["string_extended"] | ||
| if date_time_is_local: | ||
| date_time_hours = TIME_ZONE_LOCAL_UTC_OFFSET_HOURS | ||
| date_time_minutes = TIME_ZONE_LOCAL_UTC_OFFSET_MINUTES | ||
| else: | ||
| date_time_hours, date_time_minutes = (0, 0) | ||
| diff_hours = custom_hours - date_time_hours | ||
| diff_minutes = custom_minutes - date_time_minutes | ||
| date_time = date_time + timedelta( | ||
| hours=diff_hours, minutes=diff_minutes) | ||
| time_zone_string = custom_string |
There was a problem hiding this comment.
@hjoliver, this PR removes a code block that isn't used any more. Can you have a quick look at it and merge if ok.
This code block was previously only used by the Cylc 7 GUI (7.8.15):
cylc-flow/lib/cylc/gui/updater_tree.py
Lines 269 to 277 in e60e8f7
However, even then it looks like it was only used for the same purpose that is already provided by override_use_utc:
cylc-flow/lib/cylc/gui/updater_tree.py
Line 190 in e60e8f7
cylc-flow/lib/cylc/state_summary_mgr.py
Lines 125 to 128 in e60e8f7
|
(bumped to 8.5.0 as this is non-critical, bump back if merged in time) |
|
Python 3.15 is out next year, hence I think this ought to go in soon (8.7.0 at the latest) |
|
Apologies for the massive delay! |
|
Several conflicts now, sorry. |
|
@wxtim Can you check you're happy with the rebase after #6719 was merged: https://github.com/cylc/cylc-flow/compare/a42cea26581794ad04c9737543bc4b7b177900ba..2e01206ebb90dc4a9008dc70aabdf69c5ab632a0 |
|
@MetRonnie - Please check the failing test - I've kicked it just in case it's flaky? |
|
Just flaky - merging |
Spotted in pytest output
datetime.utcnow()Note
There is a risk with this because using comparison operators (e.g.
<) between timezone-aware and naive (timezone-unaware)datetimes results in a type error. However I cannot find any instances of doing any such comparisons, and all the tests are passing.sqlite3.connect():Important
Python 3.15 is coming in Oct 2026, hence I think this ought to go into 8.7.0 at the latest
Check List
CONTRIBUTING.mdand added my name as a Code Contributor.?.?.xbranch.