This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// detect time zone | |
Event.observe(window, 'load', function() { | |
var date = new Date(); | |
date.setTime(date.getTime() + (1000*24*60*60*1000)); | |
var expires = "; expires=" + date.toGMTString(); | |
var offset = -(new Date().getTimezoneOffset() / 60); | |
document.cookie = "timezone=" + offset + expires + "; path=/"; | |
}); |