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 28026D3B7 for ; Thu, 7 Mar 2013 17:22:07 +0000 (UTC) Received: (qmail 59164 invoked by uid 500); 7 Mar 2013 17:22:05 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 58982 invoked by uid 500); 7 Mar 2013 17:22:05 -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 58952 invoked by uid 99); 7 Mar 2013 17:22:04 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 Mar 2013 17:22:04 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [98.138.229.87] (HELO nm34-vm7.bullet.mail.ne1.yahoo.com) (98.138.229.87) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 Mar 2013 17:21:59 +0000 Received: from [98.138.90.54] by nm34.bullet.mail.ne1.yahoo.com with NNFMP; 07 Mar 2013 17:21:37 -0000 Received: from [98.138.84.38] by tm7.bullet.mail.ne1.yahoo.com with NNFMP; 07 Mar 2013 17:21:37 -0000 Received: from [127.0.0.1] by smtp106.mail.ne1.yahoo.com with NNFMP; 07 Mar 2013 17:21:37 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1362676897; bh=dVSgKYhGc/QZVxr2BBcykHK5Qv61w5tQtkjdJlxUQnI=; h=X-Yahoo-Newman-Id:X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:Received:From:Content-Type:Message-Id:Mime-Version:Subject:Date:References:To:In-Reply-To:X-Mailer; b=wgzmMUwYUcDhrRiPiqE+rScgGatWVTubF0CF42KmDb+PUw0yO/3Lgm6HtfpIY01+tge9fswNTbuwTZa7aTVfgH5lRk5ahHWJQABIjQ33RoXptmPNEfnBq+/qreMIyF8yDpFaRKy9G7crkHQsnSO+u32G77cXD2pv5A30gIXq0+s= X-Yahoo-Newman-Id: 77192.92595.bm@smtp106.mail.ne1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: 2OYmuSMVM1mmvoYm6oq9sQTl5n.r1rwrXYczFue4NHlKaHs UWGS8D.AhQMOq.GNds7RMtHqmVtUi2YzDVSNL8QBHhuSbBfnkynw7kByiIWJ BaASvajhfnpWKf.4pgGk9jHxgixXvwxzhaAtrTELyUqjF3LRtt7NvIaMPSlS nr7vN0ai7RNLLAPI6Lwlp.R92nRHB4yJ.6ADWaG_5CjQmm.aF46BG82GlUVm n1FoiRHWqEuIdQMorxc7Wg2RDeniqoMf2R3zUaVA1bvFbMFIpAjJWeNVaL4Q 3kKTFQgRKyrnjiedm7PWODx.JV95F6HLZW6IqpXF19Euar9RNbMhm6vUzk2i Lw_afoW.D.yaxrxSQ0ZdJsmjMm6_MguAEMXXcbk30NSgPV4m4F3IXrYp_Sgg ULC3pCUEnXxg4gobc8o_e.IjjMnNrLHfN6RpXBhVop4ZyEAHPaI..WzzxG7U LgktvI0SIkJJ2d0On3fU4xcbIAGNLYnvTGw7P6xP9GmzDvYhjHdZ0nyxFEUu BQoscLAXXflChXoE3MvSGwHZX4hYVFUDmwsmL7CxhbMrb.v0N15Jg0fjvRNy oXrSRd_m2JjqL1usOpypApToQUDsQrCmxZbkEwMrOvWpW.hPQHBIUsWLmaJu Xn0UXAyKKZzQRjI1bH_y5T1sXV8MPRA2eb849_HXR X-Yahoo-SMTP: b9FO.o6swBDjz1Oj2MrhmZVB01c- Received: from [10.0.1.4] (iomatix@71.197.38.211 with plain) by smtp106.mail.ne1.yahoo.com with SMTP; 07 Mar 2013 09:21:36 -0800 PST From: Jeff Charette Content-Type: multipart/alternative; boundary="Apple-Mail=_26EAC803-0C68-4FFA-9C5F-327F67E1ABCE" Message-Id: Mime-Version: 1.0 (Mac OS X Mail 6.2 \(1499\)) Subject: Re: map timezones Date: Thu, 7 Mar 2013 12:21:35 -0500 References: To: user@couchdb.apache.org In-Reply-To: X-Mailer: Apple Mail (2.1499) X-Virus-Checked: Checked by ClamAV on apache.org --Apple-Mail=_26EAC803-0C68-4FFA-9C5F-327F67E1ABCE Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 Kanso has the moment.js library as well so you can require it client and = server side. http://kan.so/packages/details/moment/1.7.2-kanso.2 Jeff Charette | Principal=20 We Are Charette web / identity / packaging m 415.298.2707 w wearecharette.com e jeffrey@wearecharette.com On Mar 7, 2013, at 12:24 AM, Will Heger wrote: > @Jens >=20 >> What=92s =93local time=94? The time zone of the server? A map/reduce = function >> has to be a =93pure=94 function, so it can=92t depend on any external = inputs >> that might change, such as the current timezone. >=20 >=20 > Well, this was very much my point. I'm not interested in server = locale or > a Date() time, I'm interested in the absolute time stamped on my docs = by > clients. I just want to use it in conjunction with location so my = maps can > report local time. >=20 > We are missing the following library for our views: > https://github.com/mde/timezone-js >=20 > In that way, as a developer I can store times within my document using > either UTC or epoch times. These times could be current or = historical, it > doesn't matter. What matters is that they're unambiguous. And there = exists > a pure function F such that: > F(doc.epoch_time, doc.location) =3D A time for that locale for that = moment > in history >=20 > Absent this, I think the best idea is to store the epoch time and = force the > client to also stamp the relevant local UTC offset. It offers the = most > flexibility in terms of reporting, deals with DST weirdness, and I = have > more resources to look-up UTC offsets from client code than in couch. >=20 > Thanks for letting me rubber duck this, I hope this strategy helps = someone > else, > -Will --Apple-Mail=_26EAC803-0C68-4FFA-9C5F-327F67E1ABCE--