JavaScript Tutorial/Date/getTimezoneOffset

Материал из Web эксперт
Версия от 11:25, 26 мая 2010; Admin (обсуждение | вклад) (1 версия)
(разн.) ← Предыдущая | Текущая версия (разн.) | Следующая → (разн.)
Перейти к: навигация, поиск

Date().getTimezoneOffset()

The getTimezoneOffset() method returns the difference between the time zones of local time and Greenwich Mean Time (GMT).

This difference is returned as an integer.

Although this is a method of a Date object, the actual date and time associated with the date is irrelevant because the time zone difference is based on the environment settings.



   <source lang="javascript">

<html> <head> <title>Determine Time Zone</title> </head> <body> <script language="JavaScript" type="text/javascript">

</script> </body> </html></source>


Display the timezone offsets for two different dates

   <source lang="javascript">

<html>

   <script language="JavaScript">
   
   </script>
   </html></source>