Wednesday, July 13, 2011

[Rails] Using timezone javascript to set Time.zone

I've got a javascript that provides me with the timezone for the
client. I want to use this to set Time.zone so that all my times
stored in the database are displayed in the timezone for the client.
So really simplistically

var timezone = jstz.determine_timezone().timezone
Time.zone = timezone.olson_tz

obviously this can't be done. I've taken a look on the web and can
only find 'solutions' over two years old and as ROR moves so fast I
thought someone may know of a better solution. So can anyone suggest a
simple solution?

Many thanks

--
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 rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate