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 1683EDFF1 for ; Fri, 8 Mar 2013 01:30:58 +0000 (UTC) Received: (qmail 46355 invoked by uid 500); 8 Mar 2013 01:30:56 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 46286 invoked by uid 500); 8 Mar 2013 01:30:56 -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 46278 invoked by uid 99); 8 Mar 2013 01:30:56 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 08 Mar 2013 01:30:56 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of jens@couchbase.com designates 206.225.164.29 as permitted sender) Received: from [206.225.164.29] (HELO EXHUB020-2.exch020.serverdata.net) (206.225.164.29) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 08 Mar 2013 01:30:51 +0000 Received: from EXVMBX020-1.exch020.serverdata.net ([169.254.4.201]) by EXHUB020-2.exch020.serverdata.net ([206.225.164.29]) with mapi; Thu, 7 Mar 2013 17:30:28 -0800 From: Jens Alfke To: "user@couchdb.apache.org" Date: Thu, 7 Mar 2013 17:30:28 -0800 Subject: Re: map timezones Thread-Topic: map timezones Thread-Index: Ac4bnIP4Sym8WnU4QfWICCuggloUHQ== Message-ID: References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Virus-Checked: Checked by ClamAV on apache.org On Mar 6, 2013, at 9:24 PM, Will Heger wrote: > 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, i= t > doesn't matter. What matters is that they're unambiguous. And there exis= ts > a pure function F such that: > F(doc.epoch_time, doc.location) =3D A time for that locale for that momen= t > in history I imagine that=92s likely to be a fairly _slow_ function, though, which mak= es it a bad choice to call inside map/reduce. People have already found the= ir view performance being bottlenecked by simpler tasks like basic date par= sing. > Absent this, I think the best idea is to store the epoch time and force t= he > 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. The standard date/time format already supports this, since it gives the tim= e in UTC and appends the numeric offset for local time. (E.g. =9323:53:30-0= 800=94.) =97Jens=