From: Phillip Gawlowski Date: 2007-04-10T23:28:43+09:00 Subject: Re: bug in Time.parse? siemenbaader@gmail.com wrote: > I stumbled across some odd behavior when using Time.parse. Apparently > <=> fails on Time objects generated by Time.parse when the compared > objects are equal. The parsed object appears smaller to <=>. > > > Is this known? Is it a bug or do I misunderstand something? > > I could not find it mentioned in the bugtracker or on the 'net with > google. http://www.ruby-doc.org/core/classes/Time.html#M000249 Looking into the Ruby documentation, I see a note regarding resolution: Time.now may be off by fractions of seconds, depending on your computer. For example, *nixes calculate the time using January 1st 1970 as starting point, and calculate the seconds passed since then (IIRC). Windows probably uses the CMOS clock on the motherboard, which can be off by a few seconds (or there's latency when using NTP to sync times with a clock..) AFAIK, this is a similar debate to random vs pseudo-random ;) -- Phillip "CynicalRyan" Gawlowski http://cynicalryan.110mb.com/ Rule of Open-Source Programming #15: If you like it, let the author know. If you hate it, let the author know why.