From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Thu, 23 May 2024 09:18:33 +0200 Received: from metis.whiteo.stw.pengutronix.de ([2a0a:edc0:2:b01:1d::104]) by lore.white.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1sA2ie-00ErKn-2o for lore@lore.pengutronix.de; Thu, 23 May 2024 09:18:33 +0200 Received: from localhost ([127.0.0.1] helo=metis.whiteo.stw.pengutronix.de) by metis.whiteo.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1sA2ie-0005Ze-6v; Thu, 23 May 2024 09:18:32 +0200 Received: from mo4-p00-ob.smtp.rzone.de ([81.169.146.160]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sA294-0008Qk-07 for ptxdist@pengutronix.de; Thu, 23 May 2024 08:41:47 +0200 ARC-Seal: i=1; a=rsa-sha256; t=1716446505; cv=none; d=strato.com; s=strato-dkim-0002; b=YmTc5BubmphRGhMjx5NljDmlO2JaGOyqBRexALrwQtreWVoMp+yJsNZE5z/IDfQL3F QV26Eh/zOigo75NRUE/FewJj6B0k2qQYlNugCYRFvjQkWcdSwP53hRQPHdUxfS2RzZs6 CihJyFrjAgSBjaBhMOZfBvXId0W+KtX8+QHeG+DFK0/HBzil+/fKUN/fzzhLF1748E2h rDs/CNOU2WSsAQXOl9p+oZJ4SZn7kDctyvm/W9Tc7lXOcWgHubOk5Fvzy8EYT1QKPHuT AZwBBScFOlJTxe/jjQKOR8GGFOAKHmI83W6REsVThwdmDun6LRbgFfpEI2oWnRjur7rZ d8qw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1716446505; s=strato-dkim-0002; d=strato.com; h=Subject:From:To:Date:Message-ID:Cc:Date:From:Subject:Sender; bh=AX76P50qQuGaJcp4LDDC0WQeOMCIActp2hNS+WKZIAc=; b=Cbf72EdTwR1EGezR6lTSbHzKzEMp93LvOcWNwYPLe1FZ59O3yFz75y24KF5QT7Kw9Y y2ZFWKXSOdf+1Ap+10IoiBvqcDOhLWZj0gIPAsRcMc65S1AA3TLOdZurvl+OT/xgS24B HPhYy6zY9Hm8MOEE72Uak2HXn4sJP/p4DTUrcnpoH7RAqcgJLbgpVD10M3SF3oqGLU4z udgsbZn6JJe2Msj9G8Edfy63T0/vyTVDCgiBNL6/Ma5EwIjCmfB3HTgs3BCNCraaUEpd Wa71OfGU/fX3Uvb2Afi3cn4enM0JPEcXH3t8SGoa9CoLjOQ9RJG697W6kOAe4Z08le2U Io+A== ARC-Authentication-Results: i=1; strato.com; arc=none; dkim=none X-RZG-CLASS-ID: mo00 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1716446498; s=strato-dkim-0002; d=erwinrol.com; h=Subject:From:To:Date:Message-ID:Cc:Date:From:Subject:Sender; bh=AX76P50qQuGaJcp4LDDC0WQeOMCIActp2hNS+WKZIAc=; b=CNnfJRNRMelP3wUD3731KN/6a7ipnGxh1fbGGe6uM+kLLK3NJDT+f6fCWl68Wv7yHa m8r/pT2KVTFDGY3qpvP+W7upsukLEfQWZmoVsV6Cn6MHEWdhrJSksJGgkJdq8XfViOqM U8wZuRSlsPneVMQJkVsfjdeSAxXj0WIOWKQ03psn+6SG0S4jbgrxItMJJLs+alckapBV /F5BUzdAFow6a7sTgak9ztPF+fz5KfPMExCVr8UNfqtR00Fy2QKc5wnoCjqorLc185O+ I4OQCbrxPhctwYiQAU4v0GSlixWWnVyAYG6RSAIDhHPK6Gm8A8FFmKXpuqBm6p2lxoNq RKGQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1716446498; s=strato-dkim-0003; d=erwinrol.com; h=Subject:From:To:Date:Message-ID:Cc:Date:From:Subject:Sender; bh=AX76P50qQuGaJcp4LDDC0WQeOMCIActp2hNS+WKZIAc=; b=tdeY1EzFsonJyjCW14NUGwLu3lLjrsgNSsT3DUWshqcrEJu6Oh5yCQLVDbo6lX+KVA YCZi6q2DWDEIi4ncTeCw== X-RZG-AUTH: ":KX4TfE6Ifu3Fna6O+tRWVmyhGCZuJndpLyMbKp7cMQCmG3FPqUQ51h1ZdXxcoImCqCI=" Received: from [192.168.1.15] by smtp.strato.com (RZmta 50.5.0 DYNA|AUTH) with ESMTPSA id Vcdcba04N6fcuKK (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate) for ; Thu, 23 May 2024 08:41:38 +0200 (CEST) Message-ID: <24f03e42-a9ab-4303-9d0e-3b1ff24e0097@erwinrol.com> Date: Thu, 23 May 2024 08:41:37 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird To: ptxdist@pengutronix.de Content-Language: en-US From: Erwin Rol Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on metis.whiteo.stw.pengutronix.de X-Spam-Level: X-Spam-Status: No, score=-100.8 required=4.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,USER_IN_WELCOMELIST, USER_IN_WHITELIST autolearn=ham autolearn_force=no version=3.4.2 X-Mailman-Approved-At: Thu, 23 May 2024 09:18:19 +0200 Subject: [ptxdist] year 2038 Toolchain X-BeenThere: ptxdist@pengutronix.de X-Mailman-Version: 2.1.29 Precedence: list List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de Sender: "ptxdist" X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: ptxdist-bounces@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false Hey all, I am working on arm32 (imx6ul) and need to support dates beyond 2038. With the new ptxdist 2038 support it seems to work in C, but I ran into problems with C++. The following code; auto t = std::chrono::system_clock::now(); does not seem to work correctly. When the system date is less than 2038 it works and gives back the correct time, but for dates > 2038 it seems to return some 1970 date. Conversion functions on the other hand seem to work; auto t = std::chrono::system_clock::from_time_t(time(nullptr)); does a correct conversion of dates > 2038. The defines like _TIME_BITS=64 are set correctly, and time_t is 64bit. Also calls like gettimeofday() works correctly. Since the C++ std lib is part of the Toolchain, can it be that the Toolchain is not build correctly ? Anybody any experience with y2038 in C++ on ptxdist ? best regards, Erwin