Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

JSTZ_OFFSET gets set by the backend from the session:

 var offset = new Date().getTimezoneOffset() / 60
 if(offset != parseInt(JSTZ_OFFSET)){
   new Ajax.Request("/jstz/" + offset);
 }




thanks for the code sample. didn't know JS had a date object. then again there are lot of things I don't know ...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: