From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-0.5 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.4 Received: from second.openwall.net (second.openwall.net [193.110.157.125]) by inbox.vuxu.org (Postfix) with SMTP id EAD292282B for ; Tue, 26 Mar 2024 19:56:37 +0100 (CET) Received: (qmail 15941 invoked by uid 550); 26 Mar 2024 18:51:48 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 15906 invoked from network); 26 Mar 2024 18:51:48 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pm.me; s=protonmail3; t=1711479384; x=1711738584; bh=hUCpYbY5q33ZPCQmoucpUYFQwuTKJSMWVCJUGxWUSSk=; h=Date:To:From:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=agT7kcGJ9krjNucujLEW4jILjg28dGKQB087i1S6jZTOvWM84cYc+OFiVnRBo1hva XTdmwmfcyXNKIdm3+Y56lU4rQ1zg4HtwgZjEsNAMiRJokSbFK/Vs1VkJE6FB7aCYNi NxkJJxrUPfRh/my73u6n39uMr+aMAmM5aBcEAriUNKXR3WGO4TPZtqL4CphJwgEt4B fRrL57QG6psIfh/M6DXLxzKCqEq3df3y7A3oNQTqrubPmdQU10vZyF4ZDQVyPyosYP 7vnEFJn+YQCiOTEY2O4Mj/G3jYPd9U4Pna/Iy4SAV9OvSbhDmrI7r1+izEEPXBKfTt c0jdScEnDXfbw== Date: Tue, 26 Mar 2024 18:56:13 +0000 To: musl@lists.openwall.com From: Alexander Weps Message-ID: In-Reply-To: References: <4YlR0YRqzZlDIOVv6SP8UDoop89n8u7BvQl_7eXNTvDZnogXMxG1z-TLGIBf-O4edUphddXGfADbk_d7Uzb37g5JoH7vOIvvNRMFDxPWZok=@pm.me> <20240325122113.GB4163@brightrain.aerifal.cx> Feedback-ID: 20507743:user:proton MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [musl] Broken mktime calculations when crossing DST boundary > > > Show me a function implementation that produces same time next day > > under this behavior you assume to be correct. > > > It is not possible to do that with mktime. You=E2=80=99ll have to do > that yourself. POSIX even says so. > > It does indicate that on implementations (their word for libcs > here) that follow its recommendation to not normalise tm_sec, > you can achieve the desired effect by adding 86400 to it, though > that will not work right in the presence of a leap second on > systems honouring them (which is a deviation from POSIX, of > course). > > Adding 86400 to the time_t value, under the same leap second > caveat, can work if your code can rely on POSIX (ISO C does not > specify the internal structure of time_t). Doesn't work, this will not give the same time next day, this fails on STD/= DST changes. Because same time next day is not always 86400 apart. > > bye, > //mirabilos > -- > 22:20=E2=8E=9C The crazy that persists in his craziness becomes a= master > > 22:21=E2=8E=9C And the distance between the craziness and geniali= ty is > > only measured by the success 18:35=E2=8E=9C "Psychotics are consi= stently > > inconsistent. The essence of sanity is to be inconsistently inconsistent