couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aurélien Bénel <>
Subject Re: CouchDB: Timestamp inaccurate and seems to be cached
Date Wed, 08 Jan 2014 14:34:33 GMT
> I use this Map Function to get the current Unix timestamp:
> function(doc) {emit(Math.round(new Date().getTime()/1000), null  );}

Eek! never do that.
A map function should be a function in a mathematical sense.
This means that the return value of map(x) should be ever and ever the same for a given x.



  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message