Class: Time

Inherits:
Object
  • Object
show all
Defined in:
lib/appengine-apis/datastore_types.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.new_from_java(date) ⇒ Object



29
30
31
# File 'lib/appengine-apis/datastore_types.rb', line 29

def self.new_from_java(date)
  at(date.time / 1000.0)
end

Instance Method Details

#to_javaObject



25
26
27
# File 'lib/appengine-apis/datastore_types.rb', line 25

def to_java
  java.util.Date.new(tv_sec * 1000 + tv_usec / 1000.0)
end