/* */ CALL RxFuncAdd 'ULSLoadFuncs', 'RXULS', 'ULSLoadFuncs' CALL ULSLoadFuncs CALL RxFuncAdd 'Sys2LoadFuncs', 'RXUTILEX', 'Sys2LoadFuncs' CALL Sys2LoadFuncs /* Epoch time in seconds. */ epochtime = 1234567890 epochtime = Sys2GetEpochTime() tzone = VALUE('TZ',,'OS2ENVIRONMENT') /* Convert to local time, using the current locale. */ timestr = ULSFormatTime( epochtime ) SAY timestr /* Convert to local time using the ja_JP locale and alternate calendar format. */ timestr = ULSFormatTime( epochtime, '%Ex %EX',, 'ja_JP', 932 ) SAY timestr timestr = ULSFormatTime( epochtime, '%EX %Ex',, 'ja_JP', 932 ) SAY timestr /* The previous call converts to the local time zone automatically. * Now get the time in Coordinated Universal Time (UTC). */ timestr = ULSFormatTime( epochtime, '%Y-%m-%d %X', 'Y', 'C') SAY 'The Coordinated Universal Time is:' timestr CALL ULSDropFuncs RETURN