Procedure.q GetUnixTime()
; Get the number of seconds since January 1, 1970 12:00am UTC as a 64 bit quad integer.
; Use https://www.unixtimestamp.com/ to test.
; REFERENCE: https://stackoverflow.com/questions/20370920/convert-current-time-from-windows-to-unix-timestamp
#UNIX_TIME_START = $019DB1DED53E8000 ; January 1, 1970 (start of Unix epoch) in "ticks"
#TICKS_PER_SECOND = 10000000 ; A tick is 100ns
Protected ft.q
GetSystemTimeAsFileTime_( @ft ) ; Returns ticks in UTC.
ProcedureReturn ( ft - #UNIX_TIME_START ) / #TICKS_PER_SECOND
EndProcedure
I'm currently using PureBasic 5.73 LTS (Windows - x86), as newer versions of Purebasic are a disaster with some of the software I've developed. I haven't had the opportunity to test out any new functions, such as DateUTC().
Axeman wrote: Thu Sep 11, 2025 2:01 pmI'm currently using PureBasic 5.73 LTS (Windows - x86), as newer versions of Purebasic are a disaster with some of the software I've developed.
You should sort out the problems of your old Software