[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Re: Time.gm(1969) chokes on Windows

Yukihiro Matsumoto

1/7/2008 1:39:00 AM

Hi,

In message "Re: Time.gm(1969) chokes on Windows"
on Fri, 4 Jan 2008 03:12:31 +0900, Tim Ferrell <s0nspark@gmail.com> writes:

|I was trying to sort out a YAML parsing issue on Windows XP SP 2 and
|traced it to Time.gm failing on pre-1970 dates ... this works fine on
|both Ubuntu Linux and my Mac... Any ideas or workarounds?

As many pointed out, Windows time library (probably intentionally)
does not support pre-1970 time. Until Microsoft fixes the bug (or
spec), we can't help it. The alternative is implementing our own time
handling functions but I don't think we have enough resource.

matz.

1 Answer

Tim Ferrell

1/7/2008 2:06:00 AM

0

Yukihiro Matsumoto wrote:
> Hi,
> As many pointed out, Windows time library (probably intentionally)
> does not support pre-1970 time. Until Microsoft fixes the bug (or
> spec), we can't help it. The alternative is implementing our own time
> handling functions but I don't think we have enough resource.
>
> matz.

Hello matz - I do understand both sides of this - Window is "broken" in
this respect and working around it is (pardon the pun) time consuming...

It would be helpful, at least, to have Syck fall back to using DateTime
when Time.gm fails though... this is what the Rails core extensions in
ActiveSupport do to work around the overflow...

Cheers,
Tim
--
Posted via http://www.ruby-....