From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 194FF3858D1E for ; Thu, 18 Aug 2022 01:40:06 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 194FF3858D1E Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-499-vYyiTiIKMCqg9oqyjmjhtA-1; Wed, 17 Aug 2022 21:39:58 -0400 X-MC-Unique: vYyiTiIKMCqg9oqyjmjhtA-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 6CE10811E7A; Thu, 18 Aug 2022 01:39:58 +0000 (UTC) Received: from greed.delorie.com (unknown [10.22.8.19]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 57CAA400EAB2; Thu, 18 Aug 2022 01:39:58 +0000 (UTC) Received: from greed.delorie.com.redhat.com (localhost [127.0.0.1]) by greed.delorie.com (8.15.2/8.15.2) with ESMTP id 27I1dvTN1063578; Wed, 17 Aug 2022 21:39:57 -0400 From: DJ Delorie To: Paul Eggert Cc: libc-alpha@sourceware.org Subject: Re: [swbz 29035] mktime vs non-DST In-Reply-To: Date: Wed, 17 Aug 2022 21:39:57 -0400 Message-ID: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.11.54.1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Aug 2022 01:40:08 -0000 Paul Eggert writes: > Although I'm not seeing how BZ#29035 led to your diagnosis We had a customer bz with a similar problem. I wrote a script to test every transition in every zoneinfo file, plus a january/june check, for every tm_isdst. The patterns tend to jump out at you after that. > This is a bit fancier than what you suggested, but I expect it'll fix > BZ#29035 while it's also fixing the bug reported against Gnulib. It does stop mktime from returning -1 in the problem case, but it still returns a different value than pre-2.29. Older code returned the standard time result, your patches return a DST result, even if the zone has no DST. I think this makes it more consistent, but I don't know what the consequences of "different than before" will be here.