From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Thu, 23 May 2024 08:58:22 +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 1sA2P8-00Epla-03 for lore@lore.pengutronix.de; Thu, 23 May 2024 08:58:22 +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 1sA2P7-0002bg-O7; Thu, 23 May 2024 08:58:21 +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 1sA2Oy-0002bX-Mx for ptxdist@pengutronix.de; Thu, 23 May 2024 08:58:13 +0200 ARC-Seal: i=1; a=rsa-sha256; t=1716447492; cv=none; d=strato.com; s=strato-dkim-0002; b=kNuZBRtWrQHRAmxPSBD55RjNMPKVSzjA3AELsTSTudCNG1wG9heC/BvDt+EWZPsPSE yecspBuST/s/CkfHt/AD1+BPFGkTRbZyx3dBuQMnKEqFAoEvoE923wnHwwnBHcnjOcN9 tvTNHBYVcMmw4eA9hAb3dXFxBWJq/oQg1xckxrV0L6y5F0Pp4KcO7qV9ljTrd3zfcNl6 komI21FTna0DaOo+rWamittqa3eYxQi0V2w3BBw4F4tE3JMoCE7Ug2WvKVuqxw1cZ/tT CoEXSdq3SX6YHnvbkZH9G1mH8OAXhMkyWic9AEvawCzz13eIdLFlhFGNGtolBntCPL+c +Fmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1716447492; s=strato-dkim-0002; d=strato.com; h=To:Subject:From:Date:Message-ID:Cc:Date:From:Subject:Sender; bh=AX76P50qQuGaJcp4LDDC0WQeOMCIActp2hNS+WKZIAc=; b=ooC54WUAkF6zhR/wZDWfDON6pwxjHcfFEJO1PTWJL9LdE5+NGro/d5Q7ClhRuccixe Xd2tLeqxhrdhT3kI+W/RpNHc/XfKDg28JKR9rb23ekG9rqRNfu1H6Wixo3b+uh9+jIEX yXEBeAWoj5VDSeKxd+eJBTN447DiJ7xGoG3jvPdCamubXyHKRZG4X9Vf91UxVQ1XFb34 TTK1dcjT7xG60OwNEAmGw632XiClwE5VuvzAArenIE1Z4/WuR9lWeW28pu797wTvZqhY VK3vvFstP1so5YbJ6lzHk9Np42wXqolol1uWKlD9xPw6bEYSbrNfmihAN35V2Kcre+rg Grrw== 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=1716447491; s=strato-dkim-0002; d=erwinrol.com; h=To:Subject:From:Date:Message-ID:Cc:Date:From:Subject:Sender; bh=AX76P50qQuGaJcp4LDDC0WQeOMCIActp2hNS+WKZIAc=; b=qBsUgeBjeBDcBfk9oJanmYctsNTrDeTAeTGLkPRFXhSIhKj/P9EXtWSw8vufXcQu3V mJZu7t+odIrOZvDHEQbvBMN+C556FDCJjN6m9iigc8JUN4758sRQ0RW+cY+qWSv8x+9f dQ+9QJTyZYp9nLw6k/YRmkSLD+r28yRjfZ/ecA5Iuh9P4Fonwo5WaQsZZbQM0KnPuJaX HI7G0nNNc4HW/MAAO5ok4ZUi76Uj69srQBYq74vsk8+l0rz35zebfuUN5YphsnIcz5Ul ujrTKe7qs+kzdNXXZ0muK8Ufyr1/tvLG6AnPrW9KPjYjVqtyHa4PgnKr8tyZH4zpuk3P 3z/w== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1716447491; s=strato-dkim-0003; d=erwinrol.com; h=To:Subject:From:Date:Message-ID:Cc:Date:From:Subject:Sender; bh=AX76P50qQuGaJcp4LDDC0WQeOMCIActp2hNS+WKZIAc=; b=tDxhXg4mA6QrdzzyYOqp/T4EnJn+l+xzlBhV4ZM4aFFm/o7I20olwH0SNM2npoZYqr tuws2j5dnFvxzts07RBw== X-RZG-AUTH: ":IW0NeUmmfPMLa6/h5H5SuRJPHbcbCVKNPAiWvE9c+VT2q3W9psWmf2XwhOj/G5GB3zfMUpIfZgN3" Received: from [192.168.1.15] by smtp.strato.com (RZmta 50.5.0 DYNA|AUTH) with ESMTPSA id Vcdcba04N6w4uPy (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate) for ; Thu, 23 May 2024 08:58:04 +0200 (CEST) Message-ID: <4d22d190-aee5-4bb9-930d-dd78ecca593c@erwinrol.com> Date: Thu, 23 May 2024 08:57:44 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird From: Erwin Rol To: ptxdist@pengutronix.de Content-Language: en-US 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=-1.5 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 autolearn=ham autolearn_force=no version=3.4.2 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