Return-Path: X-Original-To: apmail-couchdb-user-archive@www.apache.org Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9B3E11038B for ; Wed, 8 Jan 2014 14:46:17 +0000 (UTC) Received: (qmail 54983 invoked by uid 500); 8 Jan 2014 14:35:19 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 54831 invoked by uid 500); 8 Jan 2014 14:35:13 -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 54363 invoked by uid 99); 8 Jan 2014 14:34:28 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 08 Jan 2014 14:34:28 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of simon@cloudant.com designates 209.85.216.173 as permitted sender) Received: from [209.85.216.173] (HELO mail-qc0-f173.google.com) (209.85.216.173) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 08 Jan 2014 14:34:21 +0000 Received: by mail-qc0-f173.google.com with SMTP id m20so1448779qcx.32 for ; Wed, 08 Jan 2014 06:34:00 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:message-id:in-reply-to:references :subject:mime-version:content-type:content-transfer-encoding :content-disposition; bh=cs3uLzkAzMZAs0hjujtp/YE6PIGX+mxt30nWNWM/FUU=; b=f6qyCa5yBOpLy2CE93ZiQseJtJxuPGj8KBIs4tQlinVMXEGBt5QpaOwSxjNC8mhlGA YAX6r99PXi62Leao3B2ScbBiNJ38+v2ph/SO5770wIioHDhQEX4IzIzZMfnv0kV1ifc7 EuNNRW2FT14KMqPbhAb4jQuWPor1O/6E/jyeNpEK7xxPpWQ1ioS1rPgGEztqike/7sAH TmMjJisWDEE6bqR5t9bkkMV3FQFydDLt5yFe32TQx7HBLdxd/FUwj6cVPOvdmtt1hlS0 iNqcClumJVQPvLXlMb7jp29PC/VOyURsay1yZaAgz+R8EK2GxTl5JYB1rV5w1H4b/a+j +w0A== X-Gm-Message-State: ALoCoQlie2lw3LS5jE0KJDJHj1A/ySK0Mpprv+/txtkDhqC1L1Cgni+tVImSR66Q12If0xQiQUj2 X-Received: by 10.229.56.200 with SMTP id z8mr200460374qcg.1.1389191639181; Wed, 08 Jan 2014 06:33:59 -0800 (PST) Received: from [172.16.9.66] (50-195-18-145-static.hfc.comcastbusiness.net. [50.195.18.145]) by mx.google.com with ESMTPSA id d7sm1225555qad.10.2014.01.08.06.33.58 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 08 Jan 2014 06:33:58 -0800 (PST) Date: Wed, 8 Jan 2014 09:33:57 -0500 From: Simon Metson To: user@couchdb.apache.org Message-ID: <72C13018366C4AF7A23C3C5157AE791A@cloudant.com> In-Reply-To: References: Subject: Re: CouchDB: Timestamp inaccurate and seems to be cached X-Mailer: sparrow 1.6.4 (build 1178) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Virus-Checked: Checked by ClamAV on apache.org You map function is only run when the data changes and the view needs to = be rebuilt, so you=E2=80=99re not recording the time when you access view= but the time when the document was processed by the view. =20 Can you explain what you=E2=80=99re trying to achieve=3F Is there a reaso= n you can=E2=80=99t get the current time in the client application=3F =20 On Wednesday, 8 January 2014 at 09:17, Hank Knight wrote: > I use this Map =46unction to get the current Unix timestamp: > =20 > function(doc) =7Bemit(Math.round(new Date().getTime()/1000), null );=7D= > =20 > The odd thing is, it returns a correct timestamp the first time I run > a query but it returns the exact same timestamp one minute later even > though 60 seconds have passed=21 Is this due to caching or something > else=3F What is the best way for me to always get the current Unix > timestamp=3F