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=-2.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, 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 A32BC2140F for ; Sun, 24 Mar 2024 19:16:38 +0100 (CET) Received: (qmail 9502 invoked by uid 550); 24 Mar 2024 18:11:55 -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 9470 invoked from network); 24 Mar 2024 18:11:55 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pm.me; s=protonmail3; t=1711304186; x=1711563386; bh=5BTzOIcERVEn3Y2+Jo3H5BFPNRva7xM64nH2jHKDVmE=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=i3J74AfwETGAQd7ErKBZql4HTag2o/oEWjAlvYz6+iPwzs8B4sGuXXxqqG7OTVMsp 3DbiZ8l8MZvNHO/tAvenap+FLr43Dhe7BABP/o/GEGqiPdfst9zkqkHU1aB8wrTUDH MMn+ehCU5lZgJCnVIfrx0X4Q8FkM5J1xA8XWyoxbzXo9//cGOvzBCW7IOV2C2T21s8 ocyAqzlp62RKVkWU+Hvjc40luUVkSEOV+lin313m0PmyQDAHrc1+0E59IL9vdA3Hsy eyP77VeNVOhbiP2tX62VFau35VgXU4G4W4Kwthr2g3Aq7PPlyWfE2dY8Bnv9NmQvpv OIPbMuHVXUMqg== Date: Sun, 24 Mar 2024 18:16:20 +0000 To: musl@lists.openwall.com From: Alexander Weps Cc: Daniel Gutson , Markus Wichmann Message-ID: In-Reply-To: <20240324180200.GW4163@brightrain.aerifal.cx> References: <20240324170436.GV4163@brightrain.aerifal.cx> <0_9-JV2MW3avVvzhE9vjqKqCX0fEZy0uUuZKIohFGEFDBY912nwZyxZe560H0cf_b8L2gD8e0eUAUp2Q3e1rmra3XEppx9HPhhFeulwLYZA=@pm.me> <20240324180200.GW4163@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 > And subtracting seconds can't make time go forwards, but that's what woul= d happen with the alternate interpretation you want. That's just nonsense. I can go from 1900 to 2200 by adding seconds. And from 2200 to 1900 by subtracting seconds. I just did that using glibc. This is because each addition to struct tz fields leads to time going forwa= rd and each subtraction from struct tz fields leads to time going backwards= . As it should. There is clear ordering of struct tz contents. AW On Sunday, March 24th, 2024 at 19:02, Rich Felker wrote: > On Sun, Mar 24, 2024 at 05:12:35PM +0000, Alexander Weps wrote: > > > Adding seconds cannot make time go backwards. If that is how it was > > interpreted, than the interpretation is erroneous. > > > And subtracting seconds can't make time go forwards, but that's what > would happen with the alternate interpretation you want. > > There is fundamentally no way for the interface to read your mind and > know that the time you requested is "move forward from a past valid > normalized time" and not "move backward from a future valid normalized > time". > > Rich