clevercode / roomies

Making living together easier.
http://roomiesapp.com
2 stars 1 forks source link

User's need to be able to specify their time zone. #93

Open turtleguyyy opened 13 years ago

turtleguyyy commented 13 years ago

Date.today is their computer's time zone preferences, but Date.tomorrow uses Date.current, not Date.today. Date.current does not use the computer's time zone, which throws everything off. For instance, it is currently 9:03 on Thursday. Date.today says the same. Date.current says it's Friday. Need to find a fix for this issue or else the corkboard gets all screwy at night.

olivierlacan commented 13 years ago

Not possible if you're talking about Ruby, possible if you're talking about JavaScript and DateJS. I'm sure we can grab the Date with timezone from DateJS and shove that into Ruby. That would fix the problem of fetching the current date with the user's browser.

fullsailor commented 13 years ago

Date.today returns the system time. It "seems" to be right, simply because your local computer is in the same timezone as you are.

Date.current factors in the set timezone, which most likely is returning GMT by default.

I don't know if the browser provides a way to get a user's timezone. You could simply assume Eastern time (since thats where the majority of your testers are, then move into a more robust strategy like putting it in the user preferences.

olivierlacan commented 13 years ago

Is that even an issue anymore?

fullsailor commented 13 years ago

Yes. This a problem for any user outside of the Eastern time zone. "Today-centric" calendars will be incorrect.