Change Time.to_json to include subseconds
Reported by hkstar | November 19th, 2008 @ 07:07 PM
Since CouchDB doesn't have any equivalent auto-incrementing id fields, discerning the order in which additions took place might be problematic if there is more than one record added in a single second. This could be important for, say, logging.
I propose changing the Time.to_json monkeypatch to include sub-second precision. The change is simple: modify line 11 of monkeypatches.rb to read:
%("#{u.strftime("%Y/%m/%d %H:%M:%S.#{u.usec} +0000")}")
CouchRest and all tests should continue to work fine with this minor change.
No comments found
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
"CouchDB, close to the metal." <a href="http://github.com/jchris/couchrest/tree/master">CouchRest</a> is a RESTful layer for accessing CouchDB, based off CouchDB's included Javascript reference client. CouchRest also includes helpers for running large queries etc. There is also a base class for ActiveRecord / Datamapper style ORM, called CouchRest::Model.