On Sep 23, 2009, at 7:41 AM, Florent wrote:

>
> I found this solution: 
> http://spongetech.wordpress.com/2009/02/27/detecting-browser-time-zone-with-rails/#comment-725
> Basically, it selects the good timezone by checking the a timezone is
> currently in DST and by comparing the given offset with its own one.
>
> This solution seems to work (have to make more tests) but feels bad.

It can't be foolproof because the northern and southern hemispheres  
have opposite seasons and when they observe daylight time is  
understandably about a half-year off from the other hemisphere. I'm  
sure (even without trying to check) that there are parts of each year  
where pairs of time zones are either both observing daylight time or  
not with the same UTC offset so the best that you could do was to  
offer a small set of possible zones.

-Rob

Rob Biedenharn          http://agileconsultingllc.com
[email protected]




--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to