This project is archived and is in readonly mode.

#6489 ✓committed
Adam Meehan

Fix before_type_cast for timezone aware datetime attributes

Reported by Adam Meehan | February 28th, 2011 @ 09:13 PM | in 3.0.6

The change made to allow timezone aware datetime attributes support before_type_cast function does not work correctly. The test for the change does not exercise the code because before the timezone_aware_attributes flag is not set to true for the model used in the test. This means the timezone aware write accessor is not created for the attribute used in the test. Instead, the default write accessor is created for this attribute which does not correctly handle the timezones.

This patch fixes the test and the code

See this ticket for more context.

https://rails.lighthouseapp.com/projects/8994/tickets/3973-before_t...

Comments and changes to this ticket

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>

Pages