Class: ActiveSupport::TimeWithZone

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

Instance Method Summary collapse

Instance Method Details

#as_json(options = {}) ⇒ Object

We want dates to be a) in UTC and b) in ISO8601 always



5
6
7
# File 'lib/stitches/render_timestamps_in_iso8601_in_json.rb', line 5

def as_json(options = {})
  utc.iso8601
end