Quoting John Merlino <[email protected]>: > > I run this in console: > > >> 110.years.ago.to_datetime > => Fri, 14 Mar 1902 01:20:12 +0000 > > Today is the 13th of march. So why is it returning 14th? >
Time zones. Notice the +0000 at the end. You are in the Pacific time zone according to the headers in your e-mail (assuming the list server hasn't mangled them). So Fri, 14 Mar 1902 01:20:12 +0000 is Thu, 13 Mar 1902 18:20:12 -0700 Probably your Rails in configured to use UTC as the default timezone. $ cd config/ $ grep UTC * environment.rb: config.time_zone = 'UTC' environment.rb~: config.time_zone = 'UTC' HTH, Jeffrey -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

