Incorrect PB-implementation of Unix time stamp?

Everything else that doesn't fall into one of the other PB categories.
es_91
Enthusiast
Enthusiast
Posts: 298
Joined: Thu Jan 27, 2011 12:00 pm
Location: DE

Incorrect PB-implementation of Unix time stamp?

Post by es_91 »

Hi. I know this thread is a bit over-catchy by its name, please excuse this.

In PHP and propably more languages, the time stamp supposed to be Unix-style allows negative date values, spanning over the second values from aproximately 1902 to 1970, as well as from 1970 to aproximately 2038.

However, functions of the PureBasic date library return -1 when you try to adress dates slightly before 1970.

Who is right? To me, it seems better to be able to adress dates in the negative sector. Think of the birth dates of our previous and still living generations!

Code: Select all

Debug Date (1969, 1, 1, 0, 0, 0)

; Debug AddDate (Date (), #PB_Date_Year, -100); this just for curiousity's sake.

:mrgreen: