Time Change
A Time Change event trigger executes when the system date and time are changed.
Defining a Time Change event trigger
To define a Time Change event trigger, follow these steps:
- From the Workbench left pane, expand the node where
you want to define the Time Change event trigger.
- Select the Project icon to display
the Projects window, right-click a
specific project tab to display its pop-up menu, and
then select New.
You also can select the New button at the bottom of the Projects window when a specific project tab has already been selected. - The new Trigger window
appears.
Name the trigger. The trigger name can be up to 64 characters and include letters, numbers, and the underscore character. Spaces are allowed. - From the Event tab, select the
Trigger Event Type down-arrow, expand
the Internal category, and then select
Time Change.
The Event tab becomes active to accommodate the Time Change event.
There are no event parameters for the Time Change event.
Time Change event type trigger event variables
The input event variables available to a Time Change event trigger are:
Event variable | Data type | Description |
---|---|---|
Delta in milliseconds | INT8 | The difference between the Modified Timestamp and the Original Timestamp. |
Modified Timestamp | TIMESTAMP | The TIMESTAMP after the system's date and time were changed. |
Original Timestamp | TIMESTAMP | The TIMESTAMP before the system's date and time were changed. |
The Time Change event trigger will fire when a time change via the deviceWISE runtime happens. This includes:
- The TR50 -> Synchronize Time from Management Portal feature is enabled. See TR50 Advanced Connection Management tab.
- A Set Date & Time trigger action. See Set Date & Time.
- A time synchronization with an NTP server. See Time Management
If a time change occurs during deviceWISE runtime
startup, but before the Time Change event trigger is
started, the Time Change event trigger will fire after it
has been loaded.
The Time Change event will not fire when a time change occurs outside of the deviceWISE runtime. This includes:
- Setting the time using an operating system command line based command.
- Setting the time using the Service Execute trigger action.
- Setting the time in a Lua script.