From: Rob Biedenharn Date: 2008-01-04T04:45:36+09:00 Subject: Re: Time.gm(1969) chokes on Windows On Jan 3, 2008, at 2:29 PM, Tim Ferrell wrote: > Thanks Rob, but unfortunately I am not the one doing the parsing - > YAML > is... and it uses Time.gm/Time.utc, which are apparently "built-in" > functions in Ruby (i.e. implemented in C) ... I can't help but think > this is just a setting somewhere... > > I checked my regional settings (as James Tucker suggested) but that > setting only appears to affect how Windows interprets 2-digit years. > Ruby must be doing some kind of system api call for this and it is > just > limited on Windows... > > Any other thoughts? irb> YAML.load("--- 2008-01-03 14:42:18.998097 -05:00\n").class => Time irb> YAML.load("--- 2008-01-03\n").class => Date What does your YAML look like? What exactly is being parsed (and where does it come from if that might matter)? -Rob > Rob Biedenharn wrote: >> If you want a date, use Date. (require 'date') >> >> It handled any date you'd care to throw at it and 1969/1970 is not an >> issue. > -- > Posted via http://www.ruby-forum.com/. > Rob Biedenharn http://agileconsultingllc.com Rob@AgileConsultingLLC.com