modified Time#to_json monkeypatch to include microseconds
This commit is contained in:
parent
3da20217fd
commit
313aae3e3d
1 changed files with 1 additions and 1 deletions
|
@ -8,7 +8,7 @@ class Time
|
||||||
|
|
||||||
def to_json(options = nil)
|
def to_json(options = nil)
|
||||||
u = self.utc
|
u = self.utc
|
||||||
%("#{u.strftime("%Y/%m/%d %H:%M:%S +0000")}")
|
%("#{u.strftime("%Y/%m/%d %H:%M:%S.#{u.usec} +0000")}")
|
||||||
end
|
end
|
||||||
|
|
||||||
# Decodes the JSON time format to a UTC time.
|
# Decodes the JSON time format to a UTC time.
|
||||||
|
|
Loading…
Add table
Reference in a new issue