d10d5aedce
When the TZ in the given string contains minus offset, both hour and minute value has to be negated, but the current code negates hour only. Hence, for instance in Newfoundland Time Zone (UTC−03:30), it used to return 1 hour advanced value. Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
745 B
745 B
-
Fix a bug where type casting of string to
Time
andDateTime
doesn't calculate minus minute value in TZ offset correctly.Akira Matsuda
-
Port the
type_for_attribute
method to Active Model. Classes that includeActiveModel::Attributes
will now provide this method. This method behaves the same for Active Model as it does for Active Record.class MyModel include ActiveModel::Attributes attribute :my_attribute, :integer end MyModel.type_for_attribute(:my_attribute) # => #<ActiveModel::Type::Integer ...>
Jonathan Hefner
Please check 7-1-stable for previous changes.