class Repor::Dimensions::TimeDimension::Bin
Public Instance Methods
cast(value)
click to toggle source
# File lib/repor/dimensions/time_dimension.rb, line 79 def cast(value) case Repor.database_type when :postgres "CAST(#{super} AS timestamp with time zone)" when :sqlite "DATETIME(#{super})" else "CAST(#{super} AS DATETIME)" end end
parse(value)
click to toggle source
# File lib/repor/dimensions/time_dimension.rb, line 75 def parse(value) Time.zone.parse(value.to_s.gsub('"', '')) end