The convertTimezone task converts a timestamp by offsetting the input value in whole hour increments. This task does not take true UTC time into account — the input time is always treated as the 0:00 marker (no offset), and the output is the chosen offset applied to the input value. The output format matches the format specified in the input time.
Use this task when your workflow imports a timestamp from a device in a different time zone and you need to offset it to blend chronologically with log file history from devices in your time zone.
In this example:
inputTime comes from the getTime reference task. The reference variable is time.NewTimezone is set to +01:00 (a one-hour increment).inputTime was 03:00, the convertedTime would be 04:00.
In this example:
inputTime comes from the getTime reference task. The reference variable is time.NewTimezone is set to -02:00 (a two-hour difference).inputTime was 03:00, the convertedTime would be 01:00.
In this example:
inputTime comes from the getTime reference task. The reference variable is time.NewTimezone is set to +00:00 (no offset).inputTime was 03:00, the convertedTime would remain 03:00.
To enter the inputTime object manually, use the Year-Month-Date-Time format (yyyy-MM-dd 'T' HH:mm:ss.SSSZ):
This displays as: