On Dec 31 2009, 4:52 ¨Âí¬ Ãòéó Óèõð¼ãóèõ®®®Àùáèïï®ãïí÷òïôåº
> All,
>
> I am trying to open the Time class to add the following method.
> I am always getting this error:
> NameError: uninitialized constant Time::ZoneOffset
>
> when referencing ZoneOffset.  ¨Âèááí äïéî÷òïîç¿
>
> class Time
> def self.offset_to_zone(offset)
> offset = offset.to_i
> ZoneOffset.each_pair do |time_zone, zone_offset| #ERROR OCCURS
> HERE!!!
> return time_zone if (zone_offset == offset)
> end
> raise ArgumentError, "Illegal arguments!  ¨Âèå ïææóåô ¼¼
> offset.to_s << " is unknown."
> end
> end
> --
> Posted viahttp://www.ruby-forum.com/.

As the error status, there is no Time::ZoneOffset constant....

Are you copying/pasting random code from somewhere?
If not, what is ZoneOffset even supposed to be?