I must converte a number -> time_next_update_unix

I found this function but not run ok
chat Open Ai give me this but not run
ho I can resolve ?

I found this function but not run ok
FUNCTION UnixToDate(nUnix)
LOCAL nSecs, dDate, cTime, dDateTime
nSecs := nUnix - 28800 // correzione fuso orario
dDate := CTOD("01/01/1970")
cTime := stot(nSecs / 1000)
dDateTime := dDate + cTime
RETURN dDateTimeFUNCTION UnixToDate(nUnix)
LOCAL nSecs, dDate, cTime, dDateTime
// Converti i secondi Unix in una data Clipper e un valore di tempo
nSecs := nUnix - 28800 // correzione fuso orario
dDate := CTOD("01/01/1970")
cTime := CTOT(TIME(SECONDS(nSecs) * 1000))
// Combina la data e l'ora Clipper in un valore di data e ora Clipper
dDateTime := dDate + cTime
// Restituisci la data e ora convertite
RETURN dDateTimeSince from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com