modified Time#to_json monkeypatch to include microseconds

This commit is contained in:
Sho Fukamachi 2008-11-30 12:36:24 +11:00
parent 3da20217fd
commit 313aae3e3d

View file

@ -8,7 +8,7 @@ class Time
def to_json(options = nil)
u = self.utc
%("#{u.strftime("%Y/%m/%d %H:%M:%S +0000")}")
%("#{u.strftime("%Y/%m/%d %H:%M:%S.#{u.usec} +0000")}")
end
# Decodes the JSON time format to a UTC time.