From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from tb-mx1.topicbox.com (localhost.local [127.0.0.1]) by tb-mx1.topicbox.com (Postfix) with ESMTP id 53FBA21411C6 for <9fans@9fans.net>; Sat, 25 Apr 2020 21:54:28 -0400 (EDT) (envelope-from thierry.laronde@sfr.fr) Received: from tb-mx1.topicbox.com (localhost [127.0.0.1]) by tb-mx1.topicbox.com (Authentication Milter) with ESMTP id 62B553DC861; Sat, 25 Apr 2020 21:54:28 -0400 ARC-Seal: i=1; a=rsa-sha256; cv=none; d=topicbox.com; s=arcseal; t= 1587866068; b=al+QoTDeia5DLY+QqQfsmFCpd4bmgNNWMD1OKUQBKGUmZ29mZe bvZ+eyNGxZkQUKMaHB1HRIphWFWjQlCNN+nQV2d8C1tk1uE/mpF1WdwEqWhbAR7h mrlRxQWkpm9nFcbqqn/1xi9u6EirdvaVtcxnOhD7Df9r1H7qJZ+Vt+WffCFM+FCQ kUtg7qz0+285Xchojia8+3D4eETAN/GYnCWCV2H8rKM9TI76QKI7+O0u3N1RTA/S 0RqUZI8LpHR3OnXvgfICabGJuI6hVHvAbxyRcb6C6QNQNOddTSRAnmAaseRml8Py 22HOiWt63mX/K1Y+7N6FhiqxvttsbrMeB6pg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d= topicbox.com; h=date:from:to:subject:message-id:references :mime-version:content-type:in-reply-to; s=arcseal; t=1587866068; bh=iTzoREDkwAEUNpE47XvcfuVElJb6hOO5ghnHXCoE9fk=; b=GTU9E4hq+5sw cXw+kLptAa8bu6v+8TtBq/Mcn1Ylx+vLfpD9Z0ZbKNIG9UD4SvqNponqf7L797cq qYhn/XLT+9SFyUZ9gUjl1sSMqjLHt+t2aQ9Fx1Ob8kHk1kAOwmGdv5z8NiWoREet 8x81GZouQcX+x5FiD+M9/4cR9j4bez0Iz8iuyc6UFqa5P7/qLV4xUab6wRsYCeF/ SthX+U1j8WjoNic6jnCV+q1z1gk+fpCFl+i88Ob1bnaInPQAk13yHrf3ZT00TPG+ e/v4/CZeMXOv1NRRVsWBvCmAEy8A+j8LpUrQEqL0fDEt+a+S5OnrS5cvh3KdwIhJ v5x//vCGgg== ARC-Authentication-Results: i=1; tb-mx1.topicbox.com; arc=none (no signatures found); bimi=skipped (DMARC none); dkim=none (no signatures found); dmarc=none policy.published-domain-policy=none policy.applied-disposition=none policy.evaluated-disposition=none (p=none,d=none,d.eval=none) policy.policy-from=p header.from=polynum.com; iprev=pass smtp.remote-ip=93.17.128.206 (smtp26.services.sfr.fr); spf=pass smtp.mailfrom=thierry.laronde@sfr.fr smtp.helo=smtp26.services.sfr.fr; x-aligned-from=fail; x-ptr=pass smtp.helo=smtp26.services.sfr.fr policy.ptr=smtp26.services.sfr.fr; x-return-mx=pass header.domain=polynum.com policy.is_org=yes (MX Records found: spool.mail.gandi.net,fb.mail.gandi.net); x-return-mx=pass smtp.domain=sfr.fr policy.is_org=yes (MX Records found: smtp-in.sfr.fr); x-tls=pass smtp.version=TLSv1.2 smtp.cipher=ECDHE-RSA-AES256-GCM-SHA384 smtp.bits=256/256; x-vs=clean score=0 state=0 Authentication-Results: tb-mx1.topicbox.com; arc=none (no signatures found); bimi=skipped (DMARC none); dkim=none (no signatures found); dmarc=none policy.published-domain-policy=none policy.applied-disposition=none policy.evaluated-disposition=none (p=none,d=none,d.eval=none) policy.policy-from=p header.from=polynum.com; iprev=pass smtp.remote-ip=93.17.128.206 (smtp26.services.sfr.fr); spf=pass smtp.mailfrom=thierry.laronde@sfr.fr smtp.helo=smtp26.services.sfr.fr; x-aligned-from=fail; x-ptr=pass smtp.helo=smtp26.services.sfr.fr policy.ptr=smtp26.services.sfr.fr; x-return-mx=pass header.domain=polynum.com policy.is_org=yes (MX Records found: spool.mail.gandi.net,fb.mail.gandi.net); x-return-mx=pass smtp.domain=sfr.fr policy.is_org=yes (MX Records found: smtp-in.sfr.fr); x-tls=pass smtp.version=TLSv1.2 smtp.cipher=ECDHE-RSA-AES256-GCM-SHA384 smtp.bits=256/256; x-vs=clean score=0 state=0 X-ME-VSCause: gggruggvucftvghtrhhoucdtuddrgeduhedrheehgdehtdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdpuffr tefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecunecujfgurhepfffhvffukf hfgggtuggjfgesthdtredttdervdenucfhrhhomhepthhlrghrohhnuggvsehpohhlhihn uhhmrdgtohhmnecuffhomhgrihhnpegvihhgvghnshhtrghtvgdrohhrghdpkhgvrhhgih hsrdgtohhmpdhssghfrgdrfhhrnecukfhppeelfedrudejrdduvdekrddvtdeipdejjedr udelkedruddvuddrkeelnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinh gvthepleefrddujedruddvkedrvddtiedphhgvlhhopehsmhhtphdviedrshgvrhhvihgt vghsrdhsfhhrrdhfrhdpmhgrihhlfhhrohhmpeeothhhihgvrhhrhidrlhgrrhhonhguvg esshhfrhdrfhhrqecuuffkkgfgpeefgeehje X-ME-VSScore: 0 X-ME-VSCategory: clean Received-SPF: pass (sfr.fr: 93.17.128.206 is authorized to use 'thierry.laronde@sfr.fr' in 'mfrom' identity (mechanism 'ip4:93.17.128.0/24' matched)) receiver=tb-mx1.topicbox.com; identity=mailfrom; envelope-from="thierry.laronde@sfr.fr"; helo=smtp26.services.sfr.fr; client-ip=93.17.128.206 Received: from smtp26.services.sfr.fr (smtp26.services.sfr.fr [93.17.128.206]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by tb-mx1.topicbox.com (Postfix) with ESMTPS for <9fans@9fans.net>; Sat, 25 Apr 2020 21:54:27 -0400 (EDT) (envelope-from thierry.laronde@sfr.fr) X-mail-filterd: 0.5.0 X-sfr-mailing: LEGIT X-sfr-spamrating: 40 X-sfr-spam: not-spam Received: from cauchy.polynum.local (89.121.198.77.rev.sfr.net [77.198.121.89]) by msfrf2627.sfr.fr (SMTP Server) with ESMTP id 58D061C00040B for <9fans@9fans.net>; Sun, 26 Apr 2020 03:54:22 +0200 (CEST) Received: from cauchy.polynum.local (89.121.198.77.rev.sfr.net [77.198.121.89]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by msfrf2627.sfr.fr (SMTP Server) with ESMTPS for <9fans@9fans.net>; Sun, 26 Apr 2020 03:54:22 +0200 (CEST) Received: from cauchy.polynum.local (localhost [127.0.0.1]) by cauchy.polynum.local (8.15.2/8.15.2) with ESMTPS id 03Q1sLdc002274 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for <9fans@9fans.net>; Sun, 26 Apr 2020 03:54:21 +0200 (CEST) Received: (from tlaronde@localhost) by cauchy.polynum.local (8.15.2/8.14.9/Submit) id 03Q1sLkE002635 for 9fans@9fans.net; Sun, 26 Apr 2020 03:54:21 +0200 (CEST) X-Authentication-Warning: cauchy.polynum.local: tlaronde set sender to thierry.laronde@sfr.fr using -f Date: Sun, 26 Apr 2020 03:54:21 +0200 From: tlaronde@polynum.com To: 9fans <9fans@9fans.net> Subject: Re: [9fans] libdate Message-ID: <20200426015421.GA2501@polynum.com> References: <756B454F0747C231D31E8E3D3AFA3113@eigenstate.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <756B454F0747C231D31E8E3D3AFA3113@eigenstate.org> User-Agent: Mutt/1.5.24 (2015-08-30) Topicbox-Policy-Reasoning: allow: sender is a member Topicbox-Message-UUID: dfc8d396-8760-11ea-b93f-d7bf81608e35 Hello, On Sat, Apr 25, 2020 at 05:54:30PM -0700, ori@eigenstate.org wrote: > Date handling on plan 9 is almost adequate today if you don't > have to parse dates or deal with timezones, and don't do > multithreading. Otherwise, it's difficult to get right, and > we often don't. > > We've got a crappy home-rolled date parser in seconds(1), > a few in the upas source tree to deal with mail formats, > and git9 has a few hacks around this as well. > > Out of tree, joe9 has been trying to write code that takes > stock information in one timezone and moves them to another, > and our APIs there are completely inadequate. > > So, I tried to write a library that is adequate, without > being complicated. > Just out of curiosity (I may have missed the point): since this is not heavily system dependent, and more user related, and for the sake of APE, did you consider the standard C and the POSIX interfaces? > The code lives here: > > https://git.eigenstate.org/ori/date.git > > I'll probably be merging in the changes between Tmd and Tm > soon, and committing to 9front, possibly even as part of libc. > > Some additional work is probably going to be needed to convert > from IANA zoneinfo to actually bring our timezone data up to > date. We may also need some timezone info format changes to > handle political (and leap second) changes. > > > The manpage is attached below for review: FWIW, a typo in the sample code, the closing bracket in the assignation before comparison is missing. > if((zl = tmgetzone("local") == nil) ^ (in all the chunks). Thank you for the work! Best regards, -- Thierry Laronde http://www.kergis.com/ http://www.sbfa.fr/ Key fingerprint = 0FF7 E906 FBAF FE95 FD89 250D 52B1 AE95 6006 F40C