This project is archived and is in readonly mode.
[PATCH] PostgreSQL timestamp with zone type support
Reported by JackC | January 24th, 2010 @ 02:35 AM
The current Rails practice with PostgreSQL is to use timestamp without zone and use ActiveRecord's time zone handling. This works fine for Rails but makes it slightly inconvenient for ad hoc, local time queries outside of Rails. With this patch ActiveRecord sets the connection time to UTC when creating the connection if AR::Base.default_timezone is :utc. Rails can then handle time zones its way and other clients can use PostgreSQL's time zone handling.
Comments and changes to this ticket
-
Repository January 26th, 2010 @ 02:58 AM
- State changed from new to resolved
(from [c5b652f3d25ef92ae0f67551464fb03bda6aeb4f]) PostgreSQLAdapter: set time_zone to UTC when Base.default_timezone == :utc so that Postgres doesn't incorrectly offset-adjust values inserted into TIMESTAMP WITH TIME ZONE columns [#3777 state:resolved] http://github.com/rails/rails/commit/c5b652f3d25ef92ae0f67551464fb0...
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="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>
People watching this ticket
Attachments
Referenced by
- 3777 [PATCH] PostgreSQL timestamp with zone type support (from [c5b652f3d25ef92ae0f67551464fb03bda6aeb4f]) Postgre...