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

**URL:** <https://www.ruby-forum.com/t/time-zone-oddity-with-rails-2-2-2-and-ruby-1-8-6-win32/155424>\
**Category:** Rails\
**Created:** [December 11, 2008, 5:36pm UTC](https://www.ruby-forum.com/t/time-zone-oddity-with-rails-2-2-2-and-ruby-1-8-6-win32/155424 "2008-12-11T17:36:58Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sven](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/e47c2d/32.png) [@sven](https://www.ruby-forum.com/u/sven)\
**Post date:** [December 11, 2008, 5:36pm UTC](https://www.ruby-forum.com/t/time-zone-oddity-with-rails-2-2-2-and-ruby-1-8-6-win32/155424/1 "2008-12-11T17:36:58Z")

</div>

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
