From: Jamey Cribbs Date: 2008-01-07T04:37:36+09:00 Subject: Re: Time.gm(1969) chokes on Windows ------=_Part_6701_19763111.1199648253165 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Ryan, was this on a non-Windows device? IIRC, it is not Ruby or YAML that is the culprit, but the underlying OS library that Ruby's Time class uses. The OS library works fine on Unix-based platforms. It is only the underlying Windows library that has an issue with times prior to 1970. But you are correct, Tim can bitch as long as he wants about Syck's shortsitedness, but he should really be bitching that the underlying Windows library can't handle pre-1970 times. Jamey On Jan 6, 2008 2:16 PM, Ryan Davis wrote: > > On Jan 4, 2008, at 07:24 , Tim Ferrell wrote: > > > Obviously the string in question is a timestamp - YAML/Syck handles > > plain pre-1970 dates just fine. So, assuming I have valid pre-1970 > > timestamps to deal with, I am left with no choice BUT to work around > > Syck's (IMO shortsighted) choice of using Time.gm rather than > > DateTime, > > which I'm fairly certain was done for performance reasons... Still, it > > seems a rather bad choice given that it is not always portable. > > I'm gonna have to call bullshit on this one, given that you were asked > twice to provide the bad YAML in question and it never materialized, > but especially given that the following seems to work just fine: > > >> YAML.dump(Time.gm(1969, 1, 1)) > => "--- 1969-01-01 00:00:00 Z\n" > >> YAML.load(YAML.dump(Time.gm(1969, 1, 1))) > => Wed Jan 01 00:00:00 UTC 1969 > > > > ------=_Part_6701_19763111.1199648253165--