From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 24281 invoked from network); 1 Oct 2021 07:11:27 -0000 Received: from 4ess.inri.net (216.126.196.42) by inbox.vuxu.org with ESMTPUTF8; 1 Oct 2021 07:11:27 -0000 Received: from mimir.eigenstate.org ([206.124.132.107]) by 4ess; Fri Oct 1 03:02:31 -0400 2021 Received: from abbatoir.myfiosgateway.com (pool-74-108-56-225.nycmny.fios.verizon.net [74.108.56.225]) by mimir.eigenstate.org (OpenSMTPD) with ESMTPSA id 1f4a9442 (TLSv1.2:ECDHE-RSA-AES256-SHA:256:NO) for <9front@9front.org>; Thu, 30 Sep 2021 22:15:15 -0700 (PDT) Message-ID: To: 9front@9front.org Date: Fri, 01 Oct 2021 01:15:13 -0400 From: ori@eigenstate.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit List-ID: <9front.9front.org> List-Help: X-Glyph: ➈ X-Bullshit: converged stateless JSON core interface CMS configuration framework Subject: Re: [9front] quick tmdate question Reply-To: 9front@9front.org Precedence: bulk Quoth lyndsay : > can't find a clear answer in tmdate(2)  - i'm writing a program (in c) > that needs a way to store and parse any arbitrary time AD. will those be > properly dealt with if i store times in Tm and parse user input with > tmparse() or should i write my own function? If the proleptic gregorian calendar is enough, then tmdate should work for you. It does not handle the (locale-specific!) calendar changeovers. Our timezone information simply doesn't encode calendar changes. I'm not even sure if the IANA timezone database encodes calendar changes. I'd suggest using the proleptic gregorian calendar, and converting from it as late as possible. Ideally never. https://en.wikipedia.org/wiki/List_of_adoption_dates_of_the_Gregorian_calendar_by_country