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

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Sven (Guest)
on 2008-12-11 18:36
(Received via mailing list)
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
This topic is locked and can not be replied to.