couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aurélien Bénel <aurelien.be...@utt.fr>
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.


Regards,

Aurélien 



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