1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
<script type="text/javascript"> function clientTimeZone() { var munites = new Date().getTimezoneOffset(); var hour = parseInt(munites / 60); var munite = munites % 60; var prefix = "-"; if (hour < 0 || munite < 0) { prefix = "+"; hour = -hour; if (munite < 0) { munite = -munite; } } hour = hour + ""; munite = munite + ""; if (hour.length == 1) { hour = "0" + hour; } if (munite.length == 1) { munite = "0" + munite; } return prefix + hour + munite; } document.write("timezone="+clientTimeZone()); </script> |