Open turtleguyyy opened 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.
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.
Is that even an issue anymore?
Yes. This a problem for any user outside of the Eastern time zone. "Today-centric" calendars will be incorrect.
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.