Skip to main content
Version: 8.1

getTimezoneOffset

This function is used by Ignition's Expression language.

Description

Returns the current time zone's offset versus UTC for a given instant, taking Daylight Saving Time into account.

Syntax

getTimezoneOffset([date])

  • Parameters

    • Date date - A specified date to compare the current timezone to UTC. Will use the current time if left blank. [optional]
  • Results

    • Float - The offset of the current time from UTC.

Code Examples

Code Snippet
getTimezoneOffset(getDate(2017, 1, 22)) //Returns -8.0, if you are in Pacific Time.
Code Snippet
getTimezoneOffset(getDate(2017, 6, 22)) //Returns -7.0, if you are in Pacific Time, since Daylight Saving Time would be in effect.