[Lazarus] TimeZone problem

Steve Gatenby steveg at nevets.com.au
Mon Jan 18 02:30:25 CET 2021


Would anybody be able to point me to a solution for incorrect time reading ?

I obviously have a configuration problem between System and FPC - any 
pointers much appreciated :)

Lazarus 2.1.0 r64403 FPC 3.3.1 x86_64-linux-gtk2

Xubuntu 20.10 Desktop


test fpc app -

   WriteLn('Local time offset (minutes): ', GetLocalTimeOffset);
   WriteLn('Local Time ', TimeToStr(Now), ' is UTC ', 
TimeToStr(LocalTimeToUniversal(Now)));

outputs :

Local time offset (minutes): 0
Local Time 01:23:20 is UTC 01:23:20


'timedatectl' in terminal -

Local time: Mon 2021-01-18 11:24:21 AEST

Universal time: Mon 2021-01-18 01:24:21 UTC
RTC time: Mon 2021-01-18 01:24:21
Time zone: Australia/Brisbane (AEST, +1000)
System clock synchronized: yes
NTP service: active
RTC in local TZ: no


Thanks - SteveG




More information about the lazarus mailing list