Topic: tztime (tz_time_attributes) problem with callbacks

I'm having an odd problem with the tztime plugin, where the tz_time_attributes method seems to have trouble when used within a callback.

I'm getting a nil object error:

You have a nil object when you didn't expect it!
The error occurred while evaluating nil.utc_to_local

vendor/plugins/tztime/lib/tz_time_helpers/active_record_methods.rb:16:in `created_at'
app/models/post.rb:27
app/controllers/application.rb:111:in `get_options'
app/controllers/application.rb:75:in `set_timezone'

Here's the offending code:

http://eldorado.googlecode.com/svn/trun … ls/post.rb

The second line of the after_create method seems to be the problem. When I remove the tz_time_attributes call in the model, the problem goes away.

Any ideas on how to work around this issue would be very much appreciated.

Thanks!