Here - 
http://blog.redfin.com/devblog/2007/08/getting_the_time_zone_from_a_web_browser.html
- is a way (allegedly) of getting the user's timezone using
javascript, which could then be passed to the server.  I cannot vouch
for whether it works or not.

Colin

2009/6/19 Rick DeNatale <[email protected]>:
>
> On Thu, Jun 18, 2009 at 12:38 PM, Colin Law<[email protected]> wrote:
>>
>> 2009/6/18 Rick DeNatale <[email protected]>:
>
>>> You could use
>>>
>>> Time.zone = current_user.timezone # which would probably be in a 
>>> before_filter
>>
>> How does current_user.timezone work?
>
> Well there's a little handwaving here. The assumption is that
> current_user refers to a user model instance set up by
> restful_authentication or some other login code, and that the model
> contains the user's preferred timezone probably set by a profile ui.
>
> --
> Rick DeNatale
>
> Blog: http://talklikeaduck.denhaven2.com/
> Twitter: http://twitter.com/RickDeNatale
> WWR: http://www.workingwithrails.com/person/9021-rick-denatale
> LinkedIn: http://www.linkedin.com/in/rickdenatale
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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