I'm not positive, but I think Time.now uses your machine's timezone while
Time.now.in_time_zone will use your Rails config time zone.

Hope that helps,
Bradly



On Thu, May 12, 2011 at 8:16 PM, Guyren Howe <[email protected]> wrote:

> I’ve got a Rails 3 app where all the data is in California.
>
> I do this in config/application.rb:
>
>    config.time_zone = "Pacific Time (US & Canada)"
>
> despite this, Rails continues to try to help me by converting to and from
> UTC, in some places but not in others.
>
> Is there any way to just turn off the madness? Either a “stop helping”
> option, or something that will *actually* convert all the times I’m using to
> and from UTC without my worrying about it?
>
> Right now, my code is littered with adding and subtracting 7 hours when I
> do things in the places where it’s helping, and that way lies madness.
>
> --
> SD Ruby mailing list
> [email protected]
> http://groups.google.com/group/sdruby

-- 
SD Ruby mailing list
[email protected]
http://groups.google.com/group/sdruby

Reply via email to