Today I have installed a program written in FPC on a Debian 12 bookworm (32-bit) and to my surprise it logs all of its events with a timestamp which is 8 hours back in the past. Those stamps are result from calling the System.Now function.
The program runs properly on a several other Linux machines. I don't have a clue where the problem lies with that particular Debian machine.
Here is the output from timedatectl:
# timedatectl
Local time: Wed 2024-04-24 19:47:15 EEST
Universal time: Wed 2024-04-24 16:47:15 UTC
RTC time: Wed 2024-04-24 16:47:15
Time zone: Europe/Sofia (EEST, +0300)
System clock synchronized: yes
NTP service: active
RTC in local TZ: no
and it is quite correct.
The printout from the program:
TimeLogNow: 135843986499, TimeLogToDateTime(TimeLogNow): 2024.04.24 11:49
Now: 2024.04.24 11:49, TimeLogFromDateTime(Now): 135843986499
The difference is exactly -8 hrs, (+2 min not relevant, execution difference)
Traced back the Now function until found an external:
Now -> GetLocalTime -> DoGetLocalDateTime -> fpgettimeofday -> external name 'FPC_SYSC_GETTIMEOFDAY'
Anybody have a clue?