Forum: Ruby on Rails TzTime doesn't get saved in ActiveRecord?

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Be2b66038e24ecc43fb890ab9ce6c635?d=identicon&s=25 Reynard (Guest)
on 2007-06-01 19:26
(Received via mailing list)
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
This topic is locked and can not be replied to.