[Rails] Re: Use a Time Zone without setting Time.zone?

2009-04-27 Thread m...@d
Thanks a lot i got it.. On Apr 8, 9:50 am, Rick Schumeyer wrote: > Either I'm not understanding what you want, or this is real easy. > > Let's say I have a class Event with a field edate, which is stored in > UTC: > > >> e = Event.find(1) > > => #>> e.edate > > => Mon, 30 Mar 2009 12:00:00 UTC +

[Rails] Re: Use a Time Zone without setting Time.zone?

2009-04-07 Thread Danimal
Rick, You are _THE MAN!_. Thank you! For some reason, I was getting all confused with all the various Time, Date, TimeZone, TimeWithZone, etc. objects. I hacked together something that worked, but it was a bit more complex than what you had. I didn't realized that you could pass a TimeZone obje

[Rails] Re: Use a Time Zone without setting Time.zone?

2009-04-07 Thread Rick Schumeyer
Either I'm not understanding what you want, or this is real easy. Let's say I have a class Event with a field edate, which is stored in UTC: >> e = Event.find(1) => # >> e.edate => Mon, 30 Mar 2009 12:00:00 UTC +00:00 >> e.edate.class => ActiveSupport::TimeWithZone Now Let's say you want the ti