From owner-freebsd-current Wed Apr 10 5:33:52 2002 Delivered-To: freebsd-current@freebsd.org Received: from Awfulhak.org (gw.Awfulhak.org [217.204.245.18]) by hub.freebsd.org (Postfix) with ESMTP id 2536F37B417; Wed, 10 Apr 2002 05:33:44 -0700 (PDT) Received: from hak.lan.Awfulhak.org (root@hak.lan.Awfulhak.org [IPv6:fec0::1:12]) by Awfulhak.org (8.12.2/8.11.6) with ESMTP id g3ACXeoi029429; Wed, 10 Apr 2002 13:33:40 +0100 (BST) (envelope-from brian@freebsd-services.com) Received: from hak.lan.Awfulhak.org (brian@localhost [127.0.0.1]) by hak.lan.Awfulhak.org (8.12.2/8.12.2) with ESMTP id g3ACXaOF052655; Wed, 10 Apr 2002 13:33:36 +0100 (BST) (envelope-from brian@freebsd-services.com) Message-Id: <200204101233.g3ACXaOF052655@hak.lan.Awfulhak.org> X-Mailer: exmh version 2.5 07/13/2001 with nmh-1.0.4 To: Sean Chittenden Cc: current@FreeBSD.org, freebsd-standards@FreeBSD.org Subject: Re: mktime() doesn't fix deadzones... In-Reply-To: Message from Sean Chittenden of "Tue, 09 Apr 2002 23:40:05 PDT." <20020409234005.V66679@ninja1.internal> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 10 Apr 2002 13:33:36 +0100 From: Brian Somers Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hi, I've cc'd -standards as I think this would be of interest there. IMHO the SQL code you quote in the PR should fail with an ``invalid time'' error. Personally I like the fact that mktime() returns -1 - it allows date's -v option to act sanely, although I must admit it was a PITA to get right. The really big question is, how can you ``fix'' mktime() ? If a value of 2002-4-7 2:0:0.0 becomes 2002-4-7 3:0:0.0 PDT, then you can deduce that 2 == 3 and go on to deduce other equally bizarre things.... Thinking about it makes my head hurt ! > I haven't read POSIX yet, but mktime() fails on the boundary condition > blackholes when timezones change. I just filed a patch for the > PostgreSQL port so that it deals with this problem. > > http://www.freebsd.org/cgi/query-pr.cgi?pr=3D36954 > > I believe that Linux and SunOS handle this automatically and am > wondering if FreeBSD should too (this was the 1st time the PostgreSQL > guys had heard of this in over 6 years). I'm not a daylight savings > expert, but am wondering what other people think. Seems like a good > idea(TM) to me. For example (PST/PDT assumed): > > 2002-4-7 2:0:0.0 > > should be: > > 2002-4-7 3:0:0.0 > > Anyone object or have any thoughts? -sc -- Brian http://www.freebsd-services.com/ Don't _EVER_ lose your sense of humour ! To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message