after reading Rick''s blog about tztime plugin:
http://activereload.net/2007/4/13/dealing-with-timezones
It seems that you should be able to set TzTime object to a datetime
field, which will automatically converts it to UTC before saving,
right?
However it doesn''t seem to work for me. setting TzTime to a datetime
field doesn''t even save it to the database.
@something.posted_at = TzTime.parse(''2006-1-1 9pm'')
@something.save
@something.reload
@something.posted_at # => nil
the actual value of posted_at in database is 0000-00-00 00:00:00
(mysql default value for nil datetime)
Also, tz_time_attributes throws exception that acts_like? is not
defined.
BTW, I''m using rails 1.2.3. Does this feature need rails edge?
Regards,
- reynard
--~--~---------~--~----~------------~-------~--~----~
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---