From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from omta001.cacentral1.a.cloudfilter.net (omta001.cacentral1.a.cloudfilter.net [3.97.99.32]) by sourceware.org (Postfix) with ESMTPS id 211EA3858D3C for ; Mon, 14 Feb 2022 20:45:48 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 211EA3858D3C Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=SystematicSw.ab.ca Authentication-Results: sourceware.org; spf=none smtp.mailfrom=systematicsw.ab.ca Received: from shw-obgw-4001a.ext.cloudfilter.net ([10.228.9.142]) by cmsmtp with ESMTP id Jecbn39Iq5Rf1JiEFn33cc; Mon, 14 Feb 2022 20:45:47 +0000 Received: from [10.0.0.5] ([184.64.124.72]) by cmsmtp with ESMTP id JiEEnn9caebQ7JiEFn9yoY; Mon, 14 Feb 2022 20:45:47 +0000 X-Authority-Analysis: v=2.4 cv=fZK+dmcF c=1 sm=1 tr=0 ts=620abf7b a=oHm12aVswOWz6TMtn9zYKg==:117 a=oHm12aVswOWz6TMtn9zYKg==:17 a=IkcTkHD0fZMA:10 a=CCpqsmhAAAAA:8 a=NEAV23lmAAAA:8 a=94nOnFI1EgyDtX4ev68A:9 a=QEXdDO2ut3YA:10 a=ul9cdbp4aOFLsgKbc677:22 Message-ID: Date: Mon, 14 Feb 2022 13:45:46 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.6.0 Reply-To: newlib@sourceware.org Subject: Re: Support non-POSIX TZ strings Content-Language: en-CA To: newlib@sourceware.org References: <758cfb47-ac13-fb88-877e-63a1d4327429@SystematicSw.ab.ca> From: Brian Inglis Organization: Systematic Software In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-CMAE-Envelope: MS4xfF5yBbGwUAuG4dZcBQxigBa3YGRc3eyUHGS4lkOQH9Wg24MKXAZBvHGz8LG2RibFLebPZw53JkMLDXfYaGCY10a2rFjjui75PdnKS9xkvb8rTUwXhIDJ 2HBlNbfml1J+VVM467LEPnjlPM3SZfD7QwJDZJq3b38hxOOe0OAJJyHjEkfsVOX5kmTOg6bgaAEsXRk/AA+V2daDeFTr1OCcZ2Q= X-Spam-Status: No, score=-1163.3 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, NICE_REPLY_A, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: newlib@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Newlib mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Feb 2022 20:45:50 -0000 On 2022-02-14 12:58, jdoubleu wrote: > On 22-02-14 10:10-0700, Brian Inglis wrote: >> [..] but we should start with the actual POSIX spec under TZ > Yes, that is exactly what I meant: Newlib supporting the <> (angle > brackets) syntax. > I didn't know that it was actually part of POSIX spec, since so many > libs actually don't implement it. Most should have by now if maintained: we should be a laggard! ;^> >> The BSD or TZcode implementations could probably be adapted [..] > It looks like the TZcode implementation by Paul Eggert uses a different > approach to parsing the strings, than the current implementation in > newlib > (https://sourceware.org/git/?p=newlib-cygwin.git;a=blob;f=newlib/libc/time/tzset_r.c). > I'm not sure, if you want to copy the code over or use changes by e.g. > Earle F. Philhower from > https://github.com/earlephilhower/newlib-xtensa/pull/14. > Because of the above question, I'm not sure how to continue on this. I > would like to contribute myself and submit an implementation, but I'll > wait for feedback by other maintainers, first. Upstream sources like BSDs or TZcode official reference implementations are normally preferred because they are feature complete, regularly maintained, feature test and standards compliant, vulnerabilities checked, issues reported, and promptly fixed. I checked the BSDs and they seem to have adopted or adapted the TZcode official reference implementation, so I am not sure from where it may have been adopted, or whether it is original: the maintainer Jeff Johnson may remember. I also wonder if the GMT defaults should be updated to UTC. -- Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada This email may be disturbing to some readers as it contains too much technical detail. Reader discretion is advised. [Data in binary units and prefixes, physical quantities in SI.]