method

string_to_dummy_time

Importance_0
v1.1.6 - Show latest stable - 0 notes - Class: ActiveRecord::ConnectionAdapters::Column
string_to_dummy_time(string) public

No documentation

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

Hide source
# File activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb, line 116
      def self.string_to_dummy_time(string)
        return string unless string.is_a?(String)
        time_array = ParseDate.parsedate(string)
        # pad the resulting array with dummy date information
        time_array[0] = 2000; time_array[1] = 1; time_array[2] = 1;
        Time.send(Base.default_timezone, *time_array) rescue nil
      end
Register or log in to add new notes.