This project is archived and is in readonly mode.

#2112 ✓wontfix
Jordan Brough doesn't respect config.time_zone

Reported by Jordan Brough | March 2nd, 2009 @ 09:55 PM | in 2.x

I am located in MST timezone but want my Rails app to run in UTC. I've set config.time_zone = 'UTC' which seems to work except that remains in MST, which produces unexpected results. Should be using the modified timezone?

# config/environment.rb
config.time_zone = 'UTC'

# console
$ script/runner "puts ( +,"
$ script/runner "puts ( +,"

Comments and changes to this ticket

  • Geoff Buesing

    Geoff Buesing March 2nd, 2009 @ 10:02 PM

    • State changed from “new” to “wontfix”

    This is correct behavior: is not affected by config.time_zone/

    To get the current time in, use

  • Jordan Brough

    Jordan Brough March 2nd, 2009 @ 10:12 PM

    Thanks for the quick response. Is the reasoning for this documented anywhere? (I couldn't find it) Seems a bit unintuitive and verbose (not to mention error-prone when I forget the '.zone.').

  • Jordan Brough

    Jordan Brough March 2nd, 2009 @ 10:13 PM

    The unintuitive bit being that uses config.time_zone while + doesn't.

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href=""></a>

People watching this ticket