Method: Neo4j::TypeConverters::TimeConverter.to_java
- Defined in:
- lib/neo4j/type_converters/type_converters.rb
.to_java(value) ⇒ Object
Converts the given DateTime (UTC) value to an Fixnum. Only utc times are supported !
250 251 252 253 254 255 256 257 |
# File 'lib/neo4j/type_converters/type_converters.rb', line 250 def to_java(value) return nil if value.nil? if value.class == Date Time.utc(value.year, value.month, value.day, 0, 0, 0).to_i else value.utc.to_i end end |