4.10 Working with Times in Workflow Automation

The Workflow Automation consoles display times and allow you to type times according to the regional settings on your computer, but Workflow Automation stores all times in GMT (Greenwich Mean Time). When working with activities in the Workflow Designer, all activity output parameters related to time return a time_t value, which is the number of seconds since the start of the Unix epoch (1/1/1970 12:00:00 AM).

The Time (LOCAL) output parameter on the Get Current Time and Date activity returns a time_t value for your local time zone. All other time-related output parameters, including the Get Current Time and Date activity’s other output parameter, Time, return a time_t value that includes the GMT offset.

For example, if the Get Current Time and Date activity retrieves a date and time of 3:00 PM CST on Wednesday, July 16, 2008, the Time (LOCAL) parameter returns 1216177200 and the Time parameter returns 1216195200. The difference is 18,000 seconds, or five hours, which is the time zone offset between CST and GMT.

If you use the Input Builder to reference an output parameter from the Get Current Time and Date activity, ensure you select the appropriate parameter. For example, if you configure the Check Time Against a Schedule activity to retrieve the time from the Get Current Time and Date activity, reference the Time parameter to correctly account for the GMT offset.