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