Class: Time
- Inherits:
-
Object
- Object
- Time
- Defined in:
- lib/relaxdb/extlib.rb
Instance Method Summary collapse
-
#to_json(*args) ⇒ Object
Ensure that all Times are stored as UTC Times in the following format may be passed directly to Date.new in a JavaScript runtime.
Instance Method Details
#to_json(*args) ⇒ Object
Ensure that all Times are stored as UTC Times in the following format may be passed directly to Date.new in a JavaScript runtime
19 20 21 22 |
# File 'lib/relaxdb/extlib.rb', line 19 def to_json(*args) utc %Q("#{strftime "%Y/%m/%d %H:%M:%S +0000"}") end |