FreeTAKTeam / UI

FreeTAKServer Web User Interface project
MIT License
31 stars 29 forks source link

Calculation of uptime broken with UTC time set rather than local timezone #24

Open deddc23efb opened 2 years ago

deddc23efb commented 2 years ago

On my ubuntu 20.04 system, the FTS UI shows an incorrect negative uptime that obviously has UTC offset messing up the math.

My location us UTC-5, with the timezone on my system set to UTC I see the following output:

[UP TIME] [START TIME] -5H -59M -24S 27/12/2021 23:12

Clearly one of the methods of accessing the time is using UTC and the other isn't.
The settings on Linux show: :~$ timedatectl Local time: Mon 2021-12-27 23:24:11 UTC Universal time: Mon 2021-12-27 23:24:11 UTC RTC time: Mon 2021-12-27 23:24:12
Time zone: UTC (UTC, +0000)
System clock synchronized: yes
NTP service: active
RTC in local TZ: no

If I set the timezone on my box to the actual local timezone for my system, the display is correct.