TzTime doesn't get saved in ActiveRecord?

after reading Rick’s blog about tztime plugin:
It seems that you should be able to set TzTime object to a datetime
field, which will automatically converts it to UTC before saving,
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.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

BTW, I’m using rails 1.2.3. Does this feature need rails edge?


  • reynard