Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent time field converting zones in changes 'was' #15632

Closed

Conversation

adz
Copy link

@adz adz commented Jun 11, 2014

When changing "Time" attributes the old '_was' value (e.g. bonus_time_was) will be converted based on zone. However, in all other cases "Time" attributes do not convert zones.

The expected behaviour is to NOT convert zones due to variations across dates, even within a single zone -- see more discussion here: #3145 (comment)

Original commit added here: 36129f2

Dirty datetime attributes should be aware of time zone info

Then later removed in commit slated for rails 4.(?) cb400b0

remove unnecessary code
it was added in 36129f2
but isn't useful anymore as corresponding tests pass without it

I've made the PR to rails 3-2-stable since rails 4+ seems to have rearranged the dirty.rb file considerably.

@sgrif
Copy link
Contributor

sgrif commented Jun 11, 2014

Thank you very much for your work on this. Does this issue happen on 4.1 or 4.0? We do not accept bug fixes for the 3.x line at this time.

@adz
Copy link
Author

adz commented Jun 11, 2014

I don't believe it happens in 4.0+.

I wasn't aware that 3.2 was totally dropped in support. Ouch. Will have to track a fork till we can upgrade our mono-rail.

Thanks for your review -- closing.

@adz adz closed this Jun 11, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants