These changes
Mon Sep 4 23:15:34 2006 Yukihiro Matsumoto <matz@ruby-lang.org>
* time.c (time_to_s): make it conform to RFC2822 date format.
[ruby-dev:29467]
Mon Sep 4 21:42:35 2006 Tadayoshi Funaba <tadf@dotrb.org>
* lib/date.rb, lib/date/format.rb: updated based on date2 3.9.
introduces a subtle incompatibility or I''d say a bug.
This is 1.8.5:
irb(main):001:0> require ''time''
=> true
irb(main):002:0> t = Time.now
=> Mon Sep 04 20:37:18 EDT 2006
irb(main):003:0> t = t.getgm
=> Tue Sep 05 00:37:18 UTC 2006
irb(main):004:0> Time.parse(t.to_s)
=> Tue Sep 05 00:37:18 UTC 2006
And this is the cvs version:
irb(main):001:0> require ''time''
=> true
irb(main):002:0> t = Time.now
=> Mon, Sep 04 2006 20:29:09 -0400
irb(main):003:0> t = t.getgm
=> Tue, Sep 05 2006 00:29:09 +0000
irb(main):004:0> Time.parse(t.to_s)
=> Mon, Sep 04 2006 20:29:09 -0400
Notice that Time.parse doesn''t preserve the time zone.
--
Kent
---
http://www.datanoise.com