It's time for 64-bit time

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
wilbert
PureBasic Expert
PureBasic Expert
Posts: 3870
Joined: Sun Aug 08, 2004 5:21 am
Location: Netherlands

Re: It's time for 64-bit time

Post by wilbert »

Marc56us wrote:The main problem is how to ensure compatibility with old programs?
All date functions use the number of seconds since 1970/01/01
So how to set an earlier date and stay compatible?
Use negative values?
Change the initial date? (so it would take another library for the old programs to still work)
Indeed negative values for a date before 1970/01/01. That's the common approach.
And if that's not an option, a second more advance date library is also a possibility.
The same has been done with the VectorDrawing library.
Marc56us wrote:If it was simple Fred would have done it a long time ago.
There have been multiple feature requests in the past that are not difficult to implement but haven't been implemented.
I think it's just a matter of choice.
Windows (x64)
Raspberry Pi OS (Arm64)
User avatar
Fig
Enthusiast
Enthusiast
Posts: 351
Joined: Thu Apr 30, 2009 5:23 pm
Location: Côtes d'Azur, France

Re: It's time for 64-bit time

Post by Fig »

+1
Fred could keep old 32 functions and add 64 ones...
There are 2 methods to program bugless.
But only the third works fine.

Win10, Pb x64 5.71 LTS
User avatar
Kukulkan
Addict
Addict
Posts: 1352
Joined: Mon Jun 06, 2005 2:35 pm
Location: germany
Contact:

Re: It's time for 64-bit time

Post by Kukulkan »

+1
walbus
Addict
Addict
Posts: 929
Joined: Sat Mar 02, 2013 9:17 am

Re: It's time for 64-bit time

Post by walbus »

I never really assumed that the old function should be rebuilt, but that a Time64 should be added....
User avatar
marcoagpinto
Addict
Addict
Posts: 945
Joined: Sun Mar 10, 2013 3:01 pm
Location: Portugal
Contact:

Re: It's time for 64-bit time

Post by marcoagpinto »

+1
User avatar
Lord
Addict
Addict
Posts: 849
Joined: Tue May 26, 2009 2:11 pm

Re: It's time for 64-bit time

Post by Lord »

I also would appreciate an extended time function in PB.
But I think it will be not that easy to implement for dates
before 1970.
Look here:
http://www.purebasic.fr/english/viewtop ... 31&start=5
or here:
http://www.purebasic.fr/english/viewtop ... 37&start=9
Image
wilbert
PureBasic Expert
PureBasic Expert
Posts: 3870
Joined: Sun Aug 08, 2004 5:21 am
Location: Netherlands

Re: It's time for 64-bit time

Post by wilbert »

Lord wrote:I also would appreciate an extended time function in PB.
But I think it will be not that easy to implement for dates
before 1970.
When you support dates from January 1, 1601 into the future, there are very little problems.
You just have to make clear it uses the Gregorian date system.
It's true of course that there are a lot of countries that don't use Gregorian dates or started using them after 1601 but in general I think it solves more problems than it creates.
At the moment it isn't even possible to represent a birthday from someone born before 1970.
Windows (x64)
Raspberry Pi OS (Arm64)
BarryG
Addict
Addict
Posts: 3318
Joined: Thu Apr 18, 2019 8:17 am

Re: It's time for 64-bit time

Post by BarryG »

+1
Post Reply