| 1 |
.. _clock: |
| 2 |
|
| 3 |
clock |
| 4 |
///// |
| 5 |
|
| 6 |
Defines a **clock type** to be used by the suite, and specifies the |
| 7 |
clock gain factor. Only suites can have a clock. A clock always runs in |
| 8 |
phase with the system clock (UTC in UNIX) but can have an offset from the system clock. |
| 9 |
ecFlow generates variables from the current time. |
| 10 |
|
| 11 |
The clock must be either **hybrid** or **real** . Under a hybrid clock, |
| 12 |
the date never changes unless specifically altered or unless the suite |
| 13 |
restarts, either automatically or from a **begin** command. Under a real clock, the date |
| 14 |
advances by one day at midnight. Time and date dependencies work a |
| 15 |
little differently under the two clocks. The default clock type is **real** . |
| 16 |
|
| 17 |
Clock gain is expressed in seconds and can be given as an integer, a |
| 18 |
time or a date. Seconds and time can have a sign: |
| 19 |
|
| 20 |
.. code-block:: shell |
| 21 |
|
| 22 |
clock real 300 # the clock gains 300 sec from now |
| 23 |
clock real +01:00 # the clock gains 3600 sec from now |
| 24 |
clock real 01:00 # clock is 01:00 in the morning |
| 25 |
clock real 20.1.2012 # many days late but H:M is ok |
| 26 |
clock real 20.1.2012 +01:00 # many days late, time gains a hour |
| 27 |
|
| 28 |
The clock can only be modified using alter command, e.g. |
| 29 |
|
| 30 |
.. code-block:: shell |
| 31 |
|
| 32 |
ecflow_client --alter=change clock_type real /suite |