Skip to content
Go to file
Cannot retrieve contributors at this time
41 lines (30 sloc) 1.02 KB
title version signature
Time zone Offset
From 1.2.0, deprecated 2.9.0
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.

You can’t perform that action at this time.