incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Newson <rnew...@apache.org>
Subject Re: json date representations
Date Wed, 06 Jul 2011 15:02:29 GMT
ISO 8601 allows nanosecond precision;

"Decimal fractions may also be added to any of the three time
elements... A fraction may only be added to the lowest order time
element in the representation... There is no limit on the number of
decimal places for the decimal fraction"

B.

On 6 July 2011 15:53, Juan Jose Comellas <juanjo@comellas.org> wrote:
> 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
View raw message