pharrington,

Thanks for the reply.

From time.rb (the standard library)

class Time
  class << Time

    ZoneOffset = {
      'UTC' => 0,
      # ISO 8601
      'Z' => 0,
      # RFC 822
      'UT' => 0, 'GMT' => 0,
      'EST' => -5, 'EDT' => -4,
      'CST' => -6, 'CDT' => -5,
      'MST' => -7, 'MDT' => -6,
      'PST' => -8, 'PDT' => -7,
      # Following definition of military zones is original one.
      # See RFC 1123 and RFC 2822 for the error in RFC 822.
      'A' => +1, 'B' => +2, 'C' => +3, 'D' => +4,  'E' => +5,  'F' => 
+6,
      'G' => +7, 'H' => +8, 'I' => +9, 'K' => +10, 'L' => +11, 'M' => 
+12,
      'N' => -1, 'O' => -2, 'P' => -3, 'Q' => -4,  'R' => -5,  'S' => 
-6,
      'T' => -7, 'U' => -8, 'V' => -9, 'W' => -10, 'X' => -11, 'Y' => 
-12,
    }


I am trying to access the constant within.

Thanks,

Cris


pharrington wrote:
> On Dec 31 2009, 4:52?pm, Cris Shupp <cshu... / yahoo.com> wrote:
>> ? ? 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! ?The offset " <<
>> 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?

-- 
Posted via http://www.ruby-forum.com/.