[chandler-users] Chandler Hub UI and the System Timezone

Bobby Rullo br at osafoundation.org
Fri Sep 21 14:15:14 PDT 2007


This whole issue of whether a browser can or cannot know the timezone  
you are in is confusing to many people, so I'll try it and clarify it  
here.

JavaScript has its own Date (when I say date, I mean Date+Time) API.  
Through this API you can create dates for any arbitrary time, or get  
the current date. For any date, JavaScript also exposes the offset in  
minutes from GMT. This offset is the difference between what time it  
is according to your computer's timezone and Greenwich Mean Time.  
Right now the offset is 420 for us here in California, which is seven  
hours. If I give it a date a couple of months later it will give me  
480 which is eight hours. The difference is because of Daylight  
Savings Time. What you don't have access to is the actual timezone  
name of your local timezone.

But if I know that we're 7 hours off of GMT, doesn't that mean I know  
the timezone? Sadly, the answer is no. There other places in the  
world which are 7 hours off of GMT, but aren't in our timezone, and  
they probably have different daylight savings time rules.

The good news is that just knowing the offset for any particular  
point in time allows us to place events with timezone onto your  
calendar canvas in the right way, which is why your 3pm in NY  
appointment shows up at 12pm when your computer is in San Francisco.

I hope this clears things up a bit. If not, please let me know!

Bobby 


More information about the chandler-users mailing list