Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
date type?
#18
(03-01-2023, 05:29 PM)madscijr Wrote: One question - I see it used 64-bit integers, this means it would be immune to the problem of UNIX dates not working past the year 2038?

Might have to take away from this result, but I got 2924712086.77536 years!

Code: (Select All)
$CONSOLE:ONLY
dim n as _integer64, r as double
' maximum positive value of signed 64-bit
n = &H7FFFFFFFFFFFFFFF
' do milliseconds
r = n / 6000
' do minutes
r = r / 60
' do hours
r = r / 24
' do years
r = r / 365
print r

EDIT: maybe this program is not accurate, but we are future-proof for our generation and for the generation just becoming adults now. At least on 64-bit MacOS, Linux and "what"BSD there should be no such limit. I don't know the technical workings of "btrfs", "ext4", "zfs" and other such file systems but they use 64-bit addressing for "inodes" and stuff like that.

EDIT #2: It shouldn't be a problem with 64-bit representation of time then:

https://en.wikipedia.org/wiki/Unix_time#...able_times
https://en.wikipedia.org/wiki/Year_2038_problem
Reply


Messages In This Thread
date type? - by madscijr - 02-28-2023, 08:14 AM
RE: date type? - by mnrvovrfc - 02-28-2023, 09:21 AM
RE: date type? - by madscijr - 02-28-2023, 01:04 PM
RE: date type? - by mnrvovrfc - 02-28-2023, 02:22 PM
RE: date type? - by TerryRitchie - 02-28-2023, 07:50 PM
RE: date type? - by madscijr - 03-01-2023, 01:56 AM
RE: date type? - by mnrvovrfc - 03-01-2023, 03:37 AM
RE: date type? - by SMcNeill - 03-01-2023, 09:58 AM
RE: date type? - by bplus - 03-01-2023, 04:05 PM
RE: date type? - by madscijr - 03-01-2023, 05:29 PM
RE: date type? - by mnrvovrfc - 03-01-2023, 10:11 PM
RE: date type? - by SpriggsySpriggs - 03-01-2023, 02:40 PM
RE: date type? - by madscijr - 03-01-2023, 03:27 PM
RE: date type? - by mnrvovrfc - 03-01-2023, 04:16 PM
RE: date type? - by SpriggsySpriggs - 03-01-2023, 04:31 PM
RE: date type? - by Kernelpanic - 03-01-2023, 06:31 PM
RE: date type? - by TerryRitchie - 03-01-2023, 06:55 PM
RE: date type? - by madscijr - 03-01-2023, 09:18 PM
RE: date type? - by SMcNeill - 03-02-2023, 02:23 AM
RE: date type? - by bplus - 03-02-2023, 02:35 AM
RE: date type? - by madscijr - 03-02-2023, 06:48 PM



Users browsing this thread: 1 Guest(s)