-
Notifications
You must be signed in to change notification settings - Fork 224
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
Check time_zone_aware_types #198
Comments
What version of Rails/ActiveRecord are you using? |
6.1.3.2 |
Hi, I have this same problem because we have disabled time zone award system-wide with the config option I wrote a patch PR for this #202 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When testing if a certain attribute is time zone aware in the validator, also check the value of
ActiveRecord::Base.time_zone_aware_types
.We have
ActiveRecord::Base.time_zone_aware_types = [:datetime]
, hence :time types are not time zone aware. When validating times, they are still converted to CET, giving wrong validation errors.This problem arised with the upgrade to 5.0, because
skip_time_zone_conversion_for_attributes
is empty in our case, which leads to the attribute being interpreted as time zone aware wrongly. In version 4.1,timeliness_attribute_timezone_aware?
returned false by default.The text was updated successfully, but these errors were encountered: