moment().zone(); moment().zone(Number|String);

Note: This function has been deprecated in 2.9.0. Consider moment.fn.utcOffset instead.

Get the time zone offset in minutes.

moment().zone(); // (60, 120, 240, etc.)

As of version 2.1.0, it is possible to set the offset by passing in the number of minutes offset from GMT.


If the input is less than 16 and greater than -16, it will interpret your input as hours instead.

// these are equivalent

It is also possible to set the zone from a string.


moment#zone will search the string for the first match of +00:00 +0000 -00:00 -0000, so you can even pass an ISO8601 formatted string and the moment will be changed to that zone.