Home > Web Front-end > JS Tutorial > body text

JavaScript中的getTimezoneOffset()方法使用详解_基础知识

WBOY
Release: 2016-05-16 15:56:14
Original
1549 people have browsed it

 javascript date.getTimezoneOffset() 方法返回时区以分钟为当前区域的偏移。时区偏移量是差分钟,格林尼治标准时间(GMT)是相对于您的本地时间。

例如,如果时区是GMT+10,-600将被返回。夏令时防止从一个恒定的这个值。
语法

Date.getTimezoneOffset()
Copy after login

下面是参数的详细信息:

  • NA

返回值:

返回时区以分钟为当前区域的偏移。
例子:



JavaScript getTimezoneOffset Method

Copy after login

这将产生以下结果为印度时区:

getTimezoneOffset() : -330 

Copy after login

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact [email protected]
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!