Time zone oddity with Rails 2.2.2 and Ruby 1.8.6 (win32)


#1

The rfc822 method and to_s(:rfc822) are behaving differently. See
below:

C:\projects>rails -v
Rails 2.2.2

C:\projects>ruby -v
ruby 1.8.6 (2007-03-13 patchlevel 0) [i386-mswin32]

C:\projects>rails odd
      create
      create  app/controllers
      create  app/helpers
      ...

C:\projects>cd odd

C:\projects\odd>ruby script/console
Loading development environment (Rails 2.2.2)
>> Time.now
=> Thu Dec 11 11:24:58 -0500 2008
>> Time.now.to_s
=> "Thu Dec 11 11:25:00 -0500 2008"
>> Time.now.rfc822
=> "Thu, 11 Dec 2008 11:25:05 -0500"
>> Time.now.rfc2822
=> "Thu, 11 Dec 2008 11:25:07 -0500"

BUT:

>> Time.now.to_s(:rfc822)
=> "Thu, 11 Dec 2008 11:25:12 Eastern Standard Time"

I’m running gem Rails 2.2.2 here. The problem does not occur on Linux
with the same Rails revision and a comparable (1.8.6, 2007-03-13)
build of Ruby.

Any thoughts?

Thanks,

Sven