Timezone.js

The date/time functions allow you to extract and format the date and time for the Workflow application.

Function Description
getCurrentLocale() Returns the current locale for the device.
getLocalizedDateTime(date) Returns the specified Date as a locale-specific display as a datetime using native functionality.
getLocalizedDate(date) Returns the specified Date as a locale-specific display as a date using native functionality.
getLocalizedTime(date) Returns the specified Date as a locale-specific display as a time using native functionality.
convertUtcToLocalTime(date) Converts the specified Date to the device’s local time.
convertLocalTimeToUtc(date) Converts the specified Date to UTC time.
getOffsetFromUTC(date) Given the specified Date, queries the device's OS to determine the total offset (difference) between the given “local” time and UTC, including any daylight savings time (DST) offsets if applicable. Returns a signed integer representing this GMT offset in minutes. For example, if the device was in the London timezone (GMT+1) and it is DST is currently in effect, the function would return “120”—60 minutes normal offset plus 60 minutes for its DST offset.
isDstActiveAtGivenTime(date) Given the specified Date, queries the device's OS to determine if DST rules are in effect for the current timezone at the time specified in the Date object.
getDstOffsetAtGivenTimeInMinutes(date) Given the specified Date, queries the device's OS to determine the DST offset for the current timezone at the time specified in the Date object.
getTimezoneId() Returns the current timezone’s standard name.
getUsesDST() Determines whether or not the device’s current timezone resides in a timezone that practices daylight savings.