I am running several Lazarus / FPC programs at Raspberry Pi 3 writing events in logfiles. Today it was time for changing to daylight saving time in Germany.
The Raspi changed DST, but the Lazarus programs did not. The wrote the wrong time into the logfiles, 1 hour missing.
After closing this programs and restart them, they got the correct time and wrote them to the logfiles:
26.03.17 18:41:50 - Beende HC Data <= close program
26.03.17 19:41:53 - Starte HC Data <= this was 3secs after close
In the programs I get the time by "Now" and print it with FormatDateTime like this:
FormatDateTime('dd.mm.yy hh:nn:ss', Now)
So I am wondering what is the reason the programs do not recognize the DST change while running, but get the correct DST after restart? Can anyone explain this please?