You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@couchdb.apache.org by Simon Metson <si...@googlemail.com> on 2009/03/02 17:59:27 UTC

Timestamps

Hi All,
	Is there a way to access the create/last modified timestamp for a  
document in CouchDB from a view? If not I'll add it to my documents  
myself, but it'd be nice to get it from the server 'for free'. A quick  
google and search of the twiki yeilds nothing...
Cheers
Simon

Re: Timestamps

Posted by Noah Slater <ns...@apache.org>.
On Mon, Mar 02, 2009 at 09:02:29AM -0800, Chris Anderson wrote:
> CouchDB doesn't timestamp for you. There's not even a canonical form
> for storing time in JSON. It's all up to your application.

It would be nice if CouchDB could handle this though.

Normally I would plum for W3CDTF, but I know JavaScript has some problems.

-- 
Noah Slater, http://tumbolia.org/nslater

Re: Timestamps

Posted by Simon Metson <si...@googlemail.com>.
Ah yeah, darn! Things are never simple... ;)
Cheers all
Simon

On 2 Mar 2009, at 17:10, Noah Slater wrote:

> On Mon, Mar 02, 2009 at 05:07:52PM +0000, Simon Metson wrote:
>> I wondered if there was some clever way of accessing the time stamp  
>> from
>> the file system. Oh well, never mind, it's not a big deal...
>
> Each document is kept in the same database file, so any timestamp  
> information
> you can glean only applies to the whole database.
>
> -- 
> Noah Slater, http://tumbolia.org/nslater


Re: Timestamps

Posted by Noah Slater <ns...@apache.org>.
On Mon, Mar 02, 2009 at 05:07:52PM +0000, Simon Metson wrote:
> I wondered if there was some clever way of accessing the time stamp from
> the file system. Oh well, never mind, it's not a big deal...

Each document is kept in the same database file, so any timestamp information
you can glean only applies to the whole database.

-- 
Noah Slater, http://tumbolia.org/nslater

Re: Timestamps

Posted by Simon Metson <si...@googlemail.com>.
I wondered if there was some clever way of accessing the time stamp  
from the file system. Oh well, never mind, it's not a big deal...
Cheers
Simon

On 2 Mar 2009, at 17:02, Chris Anderson wrote:

> CouchDB doesn't timestamp for you. There's not even a canonical form
> for storing time in JSON. It's all up to your application.
>
> On Mon, Mar 2, 2009 at 8:59 AM, Simon Metson <simonmetson@googlemail.com 
> > wrote:
>> Hi All,
>>        Is there a way to access the create/last modified timestamp  
>> for a
>> document in CouchDB from a view? If not I'll add it to my documents  
>> myself,
>> but it'd be nice to get it from the server 'for free'. A quick  
>> google and
>> search of the twiki yeilds nothing...
>> Cheers
>> Simon
>>
>
>
>
> -- 
> Chris Anderson
> http://jchris.mfdz.com


Re: Timestamps

Posted by Chris Anderson <jc...@apache.org>.
CouchDB doesn't timestamp for you. There's not even a canonical form
for storing time in JSON. It's all up to your application.

On Mon, Mar 2, 2009 at 8:59 AM, Simon Metson <si...@googlemail.com> wrote:
> Hi All,
>        Is there a way to access the create/last modified timestamp for a
> document in CouchDB from a view? If not I'll add it to my documents myself,
> but it'd be nice to get it from the server 'for free'. A quick google and
> search of the twiki yeilds nothing...
> Cheers
> Simon
>



-- 
Chris Anderson
http://jchris.mfdz.com