mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
3f95054f1c
For legacy reasons Rails stores time columns on sqlite as full timestamp strings. However because the date component wasn't being normalized this meant that when they were read back they were being prefixed with 2001-01-01 by ActiveModel::Type::Time. This had a twofold result - first it meant that the fast code path wasn't being used because the string was invalid and second it was corrupting the second fractional component being read by the Date._parse code path. Fix this by a combination of normalizing the timestamps on writing and also changing Active Model to be more lenient when detecting whether a string starts with a date component before creating the dummy time value for parsing. |
||
---|---|---|
.. | ||
attribute | ||
attribute_set | ||
locale | ||
serializers | ||
type | ||
validations | ||
attribute.rb | ||
attribute_assignment.rb | ||
attribute_methods.rb | ||
attribute_mutation_tracker.rb | ||
attribute_set.rb | ||
attributes.rb | ||
callbacks.rb | ||
conversion.rb | ||
dirty.rb | ||
errors.rb | ||
forbidden_attributes_protection.rb | ||
gem_version.rb | ||
lint.rb | ||
model.rb | ||
naming.rb | ||
railtie.rb | ||
secure_password.rb | ||
serialization.rb | ||
translation.rb | ||
type.rb | ||
validations.rb | ||
validator.rb | ||
version.rb |