lib/conglomerate/serializer.rb in conglomerate-0.9.0 vs lib/conglomerate/serializer.rb in conglomerate-0.10.0
- old
+ new
@@ -210,11 +210,13 @@
end
end
def format_value(value)
case value
- when DateTime, Time
- value.iso8601.sub(/\+00:00$/, "Z")
+ when DateTime
+ value.to_time.utc.iso8601.sub(/\+00:00$/, "Z")
+ when Time
+ value.utc.iso8601.sub(/\+00:00$/, "Z")
when Date
value.strftime("%Y-%m-%d")
else
value
end