Skip to content

UTC Edge effect #6701

Open
Open
@wxtim

Description

@wxtim

Description

Symptoms: Workflows which remained up over the weekend the clocks changed in the UK displayed odd times for submit time such as:

Image

This seems to be caused by the database containing the local time, but retaining the Z timezone for time_submit in the task_jobs table.

Reproducible Example

Not yet - I'm struggling to make this happen on purpose - Cylc 8 doesn't seem to respond to changes of TZ in the environment before using cylc command.

FWIW a similar effect can be produced with

[scheduler]
    allow implicit tasks = True

[scheduling]
    cycling mode = integer
    [[graph]]
        R1 = foo => bar

[runtime]
    [[bar]]
        init-script = """
            if [[ $CYLC_TASK_CYCLE_POINT == 2 ]]; then
                cylc stop --now --now ${CYLC_WORKFLOW_ID}
                sleep 5
                sed -i 's@XXX@XXX-1@' $HOME/repos/cylc-flow/cylc/flow/scripts/cylc.py
                cylc play ${CYLC_WORKFLOW_ID}
            fi
        """

And this diff

--- a/cylc/flow/scripts/cylc.py
+++ b/cylc/flow/scripts/cylc.py
@@ -680,6 +680,13 @@ def main():
             # this is an alias to a command
             if command in ALIASES:
                 command = ALIASES.get(command)
+            os.environ['TZ'] = 'XXX'
+            print(f'{os.environ["TZ"]}')

I think that this may be related to cylc.flow.wallclock._FLAGS['UTC mode'] retaining a default of false, despite other changes suggesting that it should be true in Cylc 8

Expected Behaviour

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething is wrong :(

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions