incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Juan Jose Comellas <jua...@comellas.org>
Subject Re: json date representations
Date Wed, 06 Jul 2011 14:53:51 GMT
We use CouchDB for a telephony application where we sometimes need subsecond
precision, so we store timestamps as floating point numbers, where the
integer part corresponds to the seconds and the decimal part to the
{milli,micro,nano}seconds since the Unix epoch (Jan 1, 1970). The nice thing
about this format is that it can be used both for absolute (a date) and
relative (the offset at which an event occurred) timestamps and you can
easily perform arithmetic operations between them.


2011/7/5 Rudi Benkovič <rudib@whiletrue.com>

> Hi,
>
> I'm writing a little CouchDB administration utility and would like to
> find out how most of you store data values in JSON. From .NET via
> Newtonsoft's JSON serializer, dates end up in the ISO 8601 as a
> string, like this:
>
> { Timestamp": "2011-05-12T20:52:02.3774261Z" }
>
> Let me know what other formats are used, as I'd like to cover as much
> of them as possible - hopefully the Javascript view code will be able
> to detect them automatically.
>
> Thanks!
>
> Rudi
>

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