module GBDate::String::Time
Public Instance Methods
in_time_zone(zone = ::Time.zone)
click to toggle source
Calls superclass method
# File lib/gb_date/string.rb, line 13 def in_time_zone(zone = ::Time.zone) if zone && self =~ ::ActiveRecord::ConnectionAdapters::Column::Format::NUMERIC_TIME ::Time.find_zone!(zone).at(self.to_f) else super end end
to_time()
click to toggle source
Calls superclass method
# File lib/gb_date/string.rb, line 5 def to_time if self =~ ::ActiveRecord::ConnectionAdapters::Column::Format::NUMERIC_TIME ::Time.at(self.to_f) else super end end