class Neo4j::Shared::TypeConverters::TimeConverter
Public Class Methods
convert_type()
click to toggle source
# File lib/neo4j/shared/type_converters.rb 200 def convert_type 201 Time 202 end
db_type()
click to toggle source
# File lib/neo4j/shared/type_converters.rb 204 def db_type 205 Integer 206 end
to_db(value)
click to toggle source
Converts the given DateTime (UTC) value to an Integer. Only utc times are supported !
# File lib/neo4j/shared/type_converters.rb 210 def to_db(value) 211 if value.class == Date 212 Time.utc(value.year, value.month, value.day, 0, 0, 0).to_i 213 else 214 value.utc.to_i 215 end 216 end
to_ruby(value)
click to toggle source
# File lib/neo4j/shared/type_converters.rb 218 def to_ruby(value) 219 Time.at(value).utc 220 end