Flowdock
method

user_input_in_time_zone

Importance_0
v6.0.0 - Show latest stable - 0 notes - Class: Time
user_input_in_time_zone(value) public

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File activemodel/lib/active_model/type/time.rb, line 16
      def user_input_in_time_zone(value)
        return unless value.present?

        case value
        when ::String
          value = "2000-01-01 #{value}"
          time_hash = ::Date._parse(value)
          return if time_hash[:hour].nil?
        when ::Time
          value = value.change(year: 2000, day: 1, month: 1)
        end

        super(value)
      end
Register or log in to add new notes.