Class: ActiveSupport::TimeWithZone

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

Overview

Personal preference, I like my JSON timestamps in UTC, and xmlschema format, eg ā€œ2010-12-13T18:00:00Zā€

Instance Method Summary collapse

Instance Method Details

#to_json(options = nil) ⇒ Object



7
8
9
# File 'lib/active_support_extensions.rb', line 7

def to_json(options = nil)
  utc.xmlschema.to_json
end