[TZInfo-users] "can't modify frozen object"
phil.ross at gmail.com
Wed Jan 23 17:44:57 EST 2008
On 23/01/2008, Siva Jagadeesan <siva at yewoh.com> wrote:
> Thanks Phil for replying.
> We are using tzinfo_timezone plugin for changing dates before displaying or
> storing it the database.
> The exception is happening in that plugin. I am not sure what is happening.
> Has anybody else have come across this problem?
Yes, I agree - it looks like the exception is being raised in the
tzinfo_timezone plugin. It also looks like you are not alone in
experiencing the problem
but no one seems to have posted a solution yet.
Your call to post.created_at is returning you a TzTime object which
contains a TzinfoTimezone instance. It looks like this instance has
become frozen, causing the TzinfoTimezone#tzinfo method to raise an
exception on line 215 running the following:
@tzinfo = MAPPING[name])
I'm not sure what would have caused the TzinfoTimezone instance to
become frozen though. Perhaps you could modify tzinfo_timezone.rb,
overriding the freeze method to try and determine what is calling
freeze in the first place?
http://tzinfo.rubyforge.org/ -- DST-aware timezone library for Ruby
More information about the TZInfo-users