From: Tim Ferrell Date: 2008-01-05T00:24:28+09:00 Subject: Re: Time.gm(1969) chokes on Windows Rob Biedenharn wrote: > > You still haven't shown the exact format of the string that YAML > doesn't parse the way you want. I showed you that the format of the > string influences whether YAML creates a Date or a Time object. If > you have a string that appears to be in the format of a time, but is > outside the range of a Time object (on your platform), there may not > be any way to get YAML to do what you want. You can either get a > better platform or preprocess the YAML to add the type specifier !str > as Jamey suggests. 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. My workaround was to drop Syck for this app and use a customized version of RbYAML, as mentioned in my previous post. As for the "better platform" comment - believe me, it is not my choice to use Windows for this particular case but, given some constraints I am in no position to address right now, there is no other option. -- Posted via http://www.ruby-forum.com/.