From: Kevin Olbrich Date: 2005-08-14T23:52:31+09:00 Subject: Re: Newbie question by apparent old guy;) This is apparently inconsistent across platforms because if I do 'p Time.local(1952)' on my windows machine (ruby 1.8.2) I get an out of range error. _Kevin -----Original Message----- From: Kero [mailto:kero@chello.single-dot.nl] Sent: Sunday, August 14, 2005 10:36 AM To: ruby-talk ML Subject: Re: Newbie question by apparent old guy;) > The "Time" class stores its value as a unix timestamp, which is > defined as the number of seconds since Jan 1, 1970. Dates earlier than > that won't work. > > Try using "Date" or "DateTime" instead. What I found in some of my code: # Ruby 1.6 accepts only Time after 1970, Jan 1 (UTC) # Ruby 1.7 accepts Time before that and if I try (debian has 1.6 and 1.8 coexisting) that is confirmed: $ ruby1.6 -e 'p Time.local(1952)' -e:1:in `local': argument out of range (ArgumentError) from -e:1 $ ruby1.8 -e 'p Time.local(1952)' Tue Jan 01 00:00:00 CET 1952 +--- Kero ------------------------- kero@chello@nl ---+ | all the meaningless and empty words I spoke | | Promises -- The Cranberries | +--- M38c --- http://members.chello.nl/k.vangelder ---+