Easy Tutorial
❮ Prop Del Datetime Met Table Insertrow ❯

JavaScript getTimezoneOffset() Method

JavaScript Date Object

Example

Returns the time difference between Greenwich Mean Time and local time:

n Output result:


Definition and Usage

The getTimezoneOffset() method returns the time difference between Greenwich Mean Time and local time, in minutes.

For example, if the time zone is GMT+2, it will return -120.

Note: The return value of this method is not constant due to the practice of daylight saving time.

Tip: Coordinated Universal Time, also known as Universal Coordinated Time, World Standard Time, and International Coordinated Time, abbreviated as UTC.

Note: UTC time is the same as GMT (Greenwich Mean Time).


Browser Support

All major browsers support the getTimezoneOffset() method.


Syntax

Return Value

Type Description
Number The time difference between local time and GMT, in minutes.

Technical Details

| JavaScript Version: | 1.0 | | --- | --- |


JavaScript Date Object

❮ Prop Del Datetime Met Table Insertrow ❯