Sha256: 7327d57946b330a3dc3f1530f72998e90cc4e3d7a685ec9739e1eed5d1471b15

Contents?: true

Size: 189 Bytes

Versions: 31

Compression:

Stored size: 189 Bytes

Contents

require 'active_support/time_with_zone'

class ActiveSupport::TimeWithZone
  # We want dates to be a) in UTC and b) in ISO8601 always
  def as_json(options = {})
    utc.iso8601
  end
end

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
stitches-5.0.0 lib/stitches/render_timestamps_in_iso8601_in_json.rb
stitches-5.0.0.RC1 lib/stitches/render_timestamps_in_iso8601_in_json.rb
stitches-4.2.2 lib/stitches/render_timestamps_in_iso8601_in_json.rb
stitches-4.2.1 lib/stitches/render_timestamps_in_iso8601_in_json.rb
stitches-4.2.0 lib/stitches/render_timestamps_in_iso8601_in_json.rb
stitches-4.2.0.RC3 lib/stitches/render_timestamps_in_iso8601_in_json.rb
stitches-4.2.0.RC2 lib/stitches/render_timestamps_in_iso8601_in_json.rb
stitches-4.2.0.RC1 lib/stitches/render_timestamps_in_iso8601_in_json.rb
stitches-4.0.2 lib/stitches/render_timestamps_in_iso8601_in_json.rb
stitches-4.0.1 lib/stitches/render_timestamps_in_iso8601_in_json.rb
stitches-4.0.0 lib/stitches/render_timestamps_in_iso8601_in_json.rb
stitches-4.0.0.RC1 lib/stitches/render_timestamps_in_iso8601_in_json.rb
stitches-3.8.3 lib/stitches/render_timestamps_in_iso8601_in_json.rb
stitches-3.8.2 lib/stitches/render_timestamps_in_iso8601_in_json.rb
stitches-3.8.1 lib/stitches/render_timestamps_in_iso8601_in_json.rb
stitches-3.8.0 lib/stitches/render_timestamps_in_iso8601_in_json.rb
stitches-3.7.3 lib/stitches/render_timestamps_in_iso8601_in_json.rb
stitches-3.7.2 lib/stitches/render_timestamps_in_iso8601_in_json.rb
stitches-3.7.0 lib/stitches/render_timestamps_in_iso8601_in_json.rb
stitches-3.6.1 lib/stitches/render_timestamps_in_iso8601_in_json.rb