module RailsConnector # Adds support for string columns which contain ISO dates module DateAttribute def self.parse(iso_date_time) Time.from_iso(iso_date_time).in_time_zone rescue ArgumentError raise "The value is not a valid ISO date time: #{iso_date_time.inspect}" end end end