mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] year 2038 Toolchain
@ 2024-05-23  6:57 Erwin Rol
  0 siblings, 0 replies; 9+ messages in thread
From: Erwin Rol @ 2024-05-23  6:57 UTC (permalink / raw)
  To: ptxdist

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



^ permalink raw reply	[flat|nested] 9+ messages in thread
* [ptxdist] year 2038 Toolchain
@ 2024-05-23  6:41 Erwin Rol
  2024-05-23 10:38 ` Ian Abbott
  0 siblings, 1 reply; 9+ messages in thread
From: Erwin Rol @ 2024-05-23  6:41 UTC (permalink / raw)
  To: ptxdist

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



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2024-05-27 10:38 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-23  6:57 [ptxdist] year 2038 Toolchain Erwin Rol
  -- strict thread matches above, loose matches on Subject: below --
2024-05-23  6:41 Erwin Rol
2024-05-23 10:38 ` Ian Abbott
2024-05-23 11:52   ` Erwin Rol
2024-05-24  8:41     ` Ian Abbott
2024-05-24  9:04       ` Erwin Rol
2024-05-24 10:19         ` Michael Olbrich
2024-05-27  8:32           ` Erwin Rol
2024-05-27 10:34             ` Christian Melki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox