Incorrect Timezone on Dashboard  [SOLVED]

Have you discovered a bug? Tell us about it.
Post Reply
User avatar
LastSavingGrace
Posts: 24
Joined: Wed 9. Dec 2020, 17:45

Incorrect Timezone on Dashboard

Post 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?
select name from me;
Posts: 579
Joined: Tue 9. Feb 2016, 16:44

Re: Incorrect Timezone on Dashboard

Post 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.
Viele Grüße, Christian
User avatar
BasHeijermans
KeyHelp Translator
Posts: 158
Joined: Mon 20. Jun 2022, 12:01
Location: Heppen Belgium
Contact:

Re: Incorrect Timezone on Dashboard

Post 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.
Greetings Bas.

Ik heb KeyHelp naar het Nederlands vertaald, contacteer me als er translatie fouten zijn.
(I have translated KeyHelp into Dutch, contact me if there are translation errors.)
Next version 24 of KeyHelp 100% translated.
User avatar
Alexander
Keyweb AG
Posts: 3814
Joined: Wed 20. Jan 2016, 02:23

Re: Incorrect Timezone on Dashboard  [SOLVED]

Post 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.
Mit freundlichen Grüßen / Best regards
Alexander Mahr

**************************************************************
Keyweb AG - Die Hosting Marke
Neuwerkstr. 45/46, 99084 Erfurt / Germany
http://www.keyweb.de - http://www.keyhelp.de
**************************************************************
Post Reply