Wrong Timezone on Yunohost Buster installation

My YunoHost server

Hardware: Raspberry Pi at home
YunoHost version: 4.0.7
I have access to my server : Through SSH | through the webadmin | direct access via keyboard
Are you in a special context or did you perform some particular tweaking on your YunoHost instance ? : no

Description of my issue

Hi,

I bought a Raspberry Pi 4 and run the pre-installed image with v4.0.4. Now I found out that every timstamp (Dokuwiki, Piwigo etc) is wrong by one hour.
When I ssh on my Raspberry and call
ls -l /etc/
then I can see that localtime is a symlink to /usr/share/zoneinfo/Europe/London. This is one hour away from my timezone and might explain the problem.
If I overwrite the symlink localtime so that it points to /usr/share/zoneinfo/Europe/Berlin then I get the correct time by calling “date”. But then every app is delivering a “Bad Gateway 502” error.
By switching back to London the error disappears again.

What is the correct way to change timezone of the server?

On my old YunoHost server that was running on a Raspberry Pi 3 I installed YunoHost manually. So I called raspi-config in the beginning.
I can’t remember having a setting to set the timezone on the pre-installed image for the Raspberry 4.

Best regards,

Stefan

I would suggest sudo dpkg-reconfigure tzdata

1 Like

Or apparently there’s a command “tzselect” which allows to interactively select the timezone

1 Like

That was quick :slight_smile: Thank you very much!

I preferred tzselect and it seems to work.
I found the solution with dpkg-reconfigure tzdata in another topic and was not sure how the system will know that I want to have ‘Berlin’. Or is this way interactive, too?

Best regards,

Stefan

Ok. tzselect seems not to be permanent. There is a message to insert a line of text into a users profile to make it permanent. But which user? It should be general …

So I tried dpkg-reconfigure tzdata. And yes, it is interactive and looks much like the windows that are used in raspi-config.
After a reboot, the timestamps in Dokuwiki are correct now.

Thanks agein!

Best regards,

Stefan

2 Likes

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.