spitbol / x64

SPITBOL x64 provides raw power and speed for non-numeric computation on the x86_64 architecture
GNU General Public License v3.0
256 stars 23 forks source link

date() does not return a valid time/date #24

Closed CheyenneWills closed 8 months ago

CheyenneWills commented 8 months ago

The following returns incorrect time and dates:

   output = date()
   output = date(0)
   output = date(1)
   output = date(2)
end
02/19/70 09:39:51
02/19/70 09:16:13
02/19/1970 09:16:13
1970-02-19 09:16:13
CheyenneWills commented 8 months ago

Found the problem, very simple fix.

A call to the C time() function was dropped at one point, so the date/time values were never initialized correctly during the call to spitbol's date() function.

The fix is a simple oneliner. I will create a new release with that fix (as well as a few other minor changes).