From user-return-12859-apmail-couchdb-user-archive=couchdb.apache.org@couchdb.apache.org Wed Sep 22 20:06:53 2010 Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 25760 invoked from network); 22 Sep 2010 20:06:53 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 22 Sep 2010 20:06:53 -0000 Received: (qmail 58566 invoked by uid 500); 22 Sep 2010 20:06:52 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 58453 invoked by uid 500); 22 Sep 2010 20:06:51 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 58442 invoked by uid 99); 22 Sep 2010 20:06:50 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 Sep 2010 20:06:50 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of wanpeebaw@gmail.com designates 74.125.83.52 as permitted sender) Received: from [74.125.83.52] (HELO mail-gw0-f52.google.com) (74.125.83.52) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 Sep 2010 20:06:45 +0000 Received: by gwj20 with SMTP id 20so437124gwj.11 for ; Wed, 22 Sep 2010 13:06:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type; bh=oTBp6L0Ihc0hlCBVe3kaGAtS7Qgx2oIm71fuLpVtWs8=; b=bcI1aQ/9AabUZ2VjodjqIYaHJVhiTtr2N+t5YKJIQI+JeMcKq9YjMQVZk1urWp+QWL GuJteqzS0xJB4/A/G+lvQhg9N44I46PRsFfpEeUefh1beXO3qbWHTKf+deyOJ6ckYeMD zFqI9afHNFvA9yjzS2iV8/aJoCdNcSVqjHfNc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=caik7Jy9a4I+4xLcWevWe6mR2tFLzH83yBm3BewOyYcXgmC5nF1btFl8SkvFOySspD q5KJO6bhY3eaZTtbrGNQ3fEZ/kMi2kOGWwkMYR+hwJbaa/hj2cq45B9+BFSyFcVhNIZv ykBv59wvEAZ2VVPwYN435ZhQX6yU29LTkql4g= MIME-Version: 1.0 Received: by 10.101.169.35 with SMTP id w35mr796656ano.25.1285185983911; Wed, 22 Sep 2010 13:06:23 -0700 (PDT) Received: by 10.231.152.3 with HTTP; Wed, 22 Sep 2010 13:06:23 -0700 (PDT) In-Reply-To: <56DAA7E1-FB1A-4CDC-B608-D23A14A68D02@arcor.de> References: <56DAA7E1-FB1A-4CDC-B608-D23A14A68D02@arcor.de> Date: Thu, 23 Sep 2010 04:06:23 +0800 Message-ID: Subject: Re: Create date of a document From: sleepy To: user@couchdb.apache.org Content-Type: multipart/alternative; boundary=0016e6d3e21f0a99530490deaecc --0016e6d3e21f0a99530490deaecc Content-Type: text/plain; charset=UTF-8 Thanks for your answer. I tried to add a date in an update handler and it works. Now I'm curious. Can I add create date using validation function? It seems Couch doesn't allow me to change the doc in a validation function. 2010/9/23 Mirko Kiefer > Hi, you can simply get the date through > var date = new Date(); > > the object is documented here: > http://www.w3schools.com/js/js_obj_date.asp > > On Sep 22, 2010, at 5:35 PM, sleepy wrote: > > > Is there a way to get server time in validation function? I need that > > information in order to avoid data with future date-time > > Or can I record create date of a document using server time which is > ensured > > by server? > > > > sleepnova > > --0016e6d3e21f0a99530490deaecc--