Date - Problem with year 2038

Everything else that doesn't fall into one of the other PB categories.
Josemar
User
User
Posts: 10
Joined: Tue Mar 29, 2022 7:51 pm

Date - Problem with year 2038

Post by Josemar »

Hi all

Please, is it a estimation of solving this problem in PureBasic?

https://www.purebasic.com/documentation/date/index.html

Regards
Regards,
Josemar
Rinzwind
Enthusiast
Enthusiast
Posts: 690
Joined: Wed Mar 11, 2009 4:06 pm
Location: NL

Re: Date - Problem with year 2038

Post by Rinzwind »

Somewhere around 2039
BarryG
Addict
Addict
Posts: 4174
Joined: Thu Apr 18, 2019 8:17 am

Re: Date - Problem with year 2038

Post by BarryG »

This has been brought up over and over and over but it's never been fixed.

People have posted their own solutions - I use the Date64 module here -> https://www.purebasic.fr/english/viewto ... 07#p478507

BTW, my Samsung Galaxy S9 phone (running Android 10) only lets me set the date up to 31 Dec 2037, which shocked me.
User avatar
chi
Addict
Addict
Posts: 1087
Joined: Sat May 05, 2007 5:31 pm
Location: Austria

Re: Date - Problem with year 2038

Post by chi »

Rinzwind wrote: Tue Jul 26, 2022 9:19 am Somewhere around 2039
Sad but true :wink:
Et cetera is my worst enemy
benubi
Enthusiast
Enthusiast
Posts: 220
Joined: Tue Mar 29, 2005 4:01 pm

Re: Date - Problem with year 2038

Post by benubi »

This is because Unix dates are only 32bit. There will certainly exist a 64bit version one day. In fact 64bit OS's already use them internally. Basically the problem should evaporate when there won't be any 32bit computers and OS's in broad usage. The zip archives and file systems etc. will have to support 64bit dates instead of what they are using now. According to wikipedia a few OS's have already solved the problem (internally) by using 64bits in their new OS versions (32bit and 64bit versions). Now the problem is what you want that 64bit value to be for interoperability/new standards, some people would like to have the time in microseconds, have leap seconds and other features implemented, so there is in fact no real solution that would satisfy everybody.

https://en.wikipedia.org/wiki/Year_2038 ... #Solutions
User avatar
mk-soft
Always Here
Always Here
Posts: 6246
Joined: Fri May 12, 2006 6:51 pm
Location: Germany

Re: Date - Problem with year 2038

Post by mk-soft »

Even if the one from Wibert Date64 is the right one, I wrote a module that supports the API from the respective OS.
(Window, macOS (Intel/M1) and Linux (Intel/Arm)). So it runs also with C-backend like macOS M1 and Raspberry ARM.
For the CalendarGadget there are also functions to set and read the date.

Link: Module DateTime as Double since 1970
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
Post Reply