JavaScript Reference/Javascript Methods/getTimezoneOffset

Материал из Web эксперт
Перейти к: навигация, поиск

"getTimezoneOffset()" Example

    
<html>
<body>
<button onclick="var myDate = new Date(); 
                 alert(myDate.getTimezoneOffset());">
get time zone offset
</button>
</body>
</html>



"getTimezoneOffset()" is applied to

+----------------+--------------------------------------------------------------+
| Applied_To     |Date                                                          |
+----------------+--------------------------------------------------------------+



"getTimezoneOffset()" Syntax, Parameters and Note

Note:
Returns the difference in minutes between Greenwich Mean Time (GMT) and 
the local system"s time.
    
Syntax:
    
dateName.getTimezoneOffset()