Get your timezone : Date Calculation « Date Time « JavaScript DHTML






Get your timezone

   
<html>
<head>
  
</head>
<body>
<script type="text/javascript">
  var today = new Date();
  offset = (today.getTimezoneOffset() / 60) + 1;

  if (offset == 5) {
    alert("You are in the Eastern Timezone");
  }
</script>
</body>
</html>

   
    
    
  








Related examples in the same category

1.Calculate the days between two dates
2.Date Object Calculations
3.Append date to string
4.Putting a Time Stamp on a Page