Support for 64-bit Date()

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
Mistrel
Addict
Addict
Posts: 3415
Joined: Sat Jun 30, 2007 8:04 pm

Support for 64-bit Date()

Post by Mistrel »

Date() is still using the old 32-bit POSIX time which will wrap around in 2038. Granted, that's still 27 years in the future, but it's still a problem that can affect calculations that deal with future time much earlier.
User avatar
KJ67
Enthusiast
Enthusiast
Posts: 218
Joined: Fri Jun 26, 2009 3:51 pm
Location: Westernmost tip of Norway

Re: Support for 64-bit Date()

Post by KJ67 »

+1

I ran into this issue during the summer when I was doing a small app for the office, simply speaking so ended all younger colleges up with very odd amount of years left.
The best preparation for tomorrow is doing your best today.
User avatar
Demivec
Addict
Addict
Posts: 4260
Joined: Mon Jul 25, 2005 3:51 pm
Location: Utah, USA

Re: Support for 64-bit Date()

Post by Demivec »

I think this is useful also. The currently Date library is limited to roughly a 68 year range of time. I would be in favor of changes to support a 64-bit Date().
Seymour Clufley
Addict
Addict
Posts: 1264
Joined: Wed Feb 28, 2007 9:13 am
Location: London

Re: Support for 64-bit Date()

Post by Seymour Clufley »

What would be the date limits with 64-bit?
JACK WEBB: "Coding in C is like sculpting a statue using only sandpaper. You can do it, but the result wouldn't be any better. So why bother? Just use the right tools and get the job done."
Mistrel
Addict
Addict
Posts: 3415
Joined: Sat Jun 30, 2007 8:04 pm

Re: Support for 64-bit Date()

Post by Mistrel »

Seymour Clufley wrote:What would be the date limits with 64-bit?
Approximately 292 billion years. :)
User avatar
blueznl
PureBasic Expert
PureBasic Expert
Posts: 6166
Joined: Sat May 17, 2003 11:31 am
Contact:

Re: Support for 64-bit Date()

Post by blueznl »

I can live with that :wink:
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB)
( The path to enlightenment and the PureBasic Survival Guide right here... )
Little John
Addict
Addict
Posts: 4778
Joined: Thu Jun 07, 2007 3:25 pm
Location: Berlin, Germany

Re: Support for 64-bit Date()

Post by Little John »

This has been discussed repeatedly.

We can even now easily access a bigger range of dates than the current PB library does, see
http://www.purebasic.fr/english/viewtopic.php?t=33714

Regards, Little John
MachineCode
Addict
Addict
Posts: 1482
Joined: Tue Feb 22, 2011 1:16 pm

Re: Support for 64-bit Date()

Post by MachineCode »

+1
Microsoft Visual Basic only lasted 7 short years: 1991 to 1998.
PureBasic: Born in 1998 and still going strong to this very day!
Hysteria
User
User
Posts: 50
Joined: Sat Oct 23, 2010 8:51 am
Location: UK

Re: Support for 64-bit Date()

Post by Hysteria »

I'd really like to see this too. I've been writing a little app that needs to go much further back than 1970 and far prefer native solutions to workarounds.

While on the subject, it would be great to be able to use 'setgadgettext' with a date gadget given that 'getgadgettext' is capable of reading it. That would avoid the need to use date() at all in this instance.
Post Reply