getOffsetFromUTC( date ) method

Returns the total offset (difference) between the given "local" time and UTC including any daylight savings offsets if applicable.

Example: if the device was in London timezone (Gmt +1) and it is currently practicing DST, the function would return "120": 60 minutes normal offset plus 60 minutes for its daylight savings offset.

Syntax

<static> getOffsetFromUTC( date ) → {int}

Parameters

Name Type Description
date Date Date at which time to determine offset, initialized to some valid time.

Returns

Returns the GMT offset in minutes.

[/reference/refbody/section/sectiondiv {""})

Type:

int

(sectiondiv]

Example

var totalOffset = hwc.getOffsetFromUTC(date);

Source

Timezone.js, line 268.