Page 1 of 1

Incorrect Timezone on Dashboard

Posted: Sun 24. Jul 2022, 05:51
by LastSavingGrace
Hi Alex,

I have set the timezone to Europe/London in the Keyhelp config and if I check the server using 'date' it is the correct UK timezone, but on the Keyhelp dashboard it says:

XX:XX:XX - July 24, 2022 (America/Los_Angeles)

The time is always correct, but the timezone wrong. Bug maybe?

Re: Incorrect Timezone on Dashboard

Posted: Sun 24. Jul 2022, 09:54
by select name from me;
LastSavingGrace wrote: Sun 24. Jul 2022, 05:51 Hi Alex,

I have set the timezone to Europe/London in the Keyhelp config and if I check the server using 'date' it is the correct UK timezone, but on the Keyhelp dashboard it says:

XX:XX:XX - July 24, 2022 (America/Los_Angeles)

The time is always correct, but the timezone wrong. Bug maybe?
Probably your OS PHP timezone is still wrong. The timezone is defined in many files.
These are the steps, that I do, if I need to change the timezone. I use Ubuntu.

Code: Select all

# Check the OS timezone
ls -l /etc/localtime 

# Set the OS timezone
timedatectl set-timezone Europe/Berlin

# Set the OS PHP timezone
vim /etc/php/7.4/mods-available/timezone.ini  
vim /etc/php/7.4/cli/conf.d/30-timezone.ini  

# Set the Keyhelp timezone for every installed PHP Version
vim /opt/keyhelp/php/8.0/etc/conf.d/30-timezone.ini  
vim /opt/keyhelp/php/8.1/etc/conf.d/30-timezone.ini  
...
I hope this helps.

Re: Incorrect Timezone on Dashboard

Posted: Sun 24. Jul 2022, 16:24
by BasHeijermans
What does this tell you?

Code: Select all

timedatectl 
Should show this, as mine is set for Brussels.

Local time: zo 2022-07-24 16:20:04 CEST
Universal time: zo 2022-07-24 14:20:04 UTC
RTC time: zo 2022-07-24 14:20:04
Time zone: Europe/Brussels (CEST, +0200)
System clock synchronized: yes
NTP service: n/a
RTC in local TZ: no

Maybe your machine runs different and hasn't been set correctly.

Sometimes all it takes is a reboot after a setting change, you never know.

Re: Incorrect Timezone on Dashboard  [SOLVED]

Posted: Mon 25. Jul 2022, 10:26
by Alexander
Hello,

Have you updated "Configuration -> System Time"?

This should normally takes care of updating the timezone in all relevant files.

... it updates:

Code: Select all

# The system default PHP interpreter:
/etc/php/*/mods-available/timezone.ini

# All optional PHP interpreter
/opt/keyhelp/php/*/etc/conf.d/*timezone.ini
... and utilize the command:

Code: Select all

timedatectl set-timezone
... and restarts the PHP-FPM services.