Class: Time

Inherits:
Object
  • Object
show all
Defined in:
lib/monkeypatches/time.rb

Instance Method Summary collapse

Instance Method Details

#to_json(options = nil) ⇒ Object



6
7
8
# File 'lib/monkeypatches/time.rb', line 6

def to_json(options = nil)
  %("#{to_json_format}")
end

#to_json_formatObject



2
3
4
# File 'lib/monkeypatches/time.rb', line 2

def to_json_format
  self.getutc.strftime("%Y/%m/%d %H:%M:%S +0000")
end