lib/monkeypatches/time.rb in mattly-exegesis-0.2.0 vs lib/monkeypatches/time.rb in mattly-exegesis-0.2.1
- old
+ new
@@ -1,5 +1,9 @@
class Time
+ def to_json_format
+ self.getutc.strftime("%Y/%m/%d %H:%M:%S +0000")
+ end
+
def to_json(options = nil)
- %("#{self.dup.utc.strftime("%Y/%m/%d %H:%M:%S +0000")}")
+ %("#{to_json_format}")
end
end
\ No newline at end of file