Config.php -> timezone produces wrong time for NC

Hi all,

I am using the latest debian bookworm and Nextcloud AIO v9.6.0 running the latest updates.

The problem that I have is that the system date is 2 hours early. I live in germany and it is 11:31 right now. Nextcloud shows this however in https://domain.tld/settings/admin/serverinfo :

Server-Zeit: Sun Oct 6 09:39:29 UTC 2024 

when I then run “date” in a terminal, it shows the correct date and Timezone:

$ date
So 6. Okt 11:39:31 CEST 2024

and in my Nextcloud´ s config.php the timezone is set to ‘Europe/Berlin’. I edit config.php via this command:

sudo docker run -it --rm --volume nextcloud_aio_nextcloud:/var/www/html:rw alpine sh -c "apk add --no-cache nano && nano /var/www/html/config/config.php"

(following the README on https://github.com/nextcloud/all-in-one)

So - as far as I can see, Debian knows the correct time and the correct timezone, so does Nextcloud voa config.php - but Nextcloud only shows UTC time in the Admin Interface. How can I really set Nextcloud on my timezone (CEST, not UTC). What am I missing?

Thanks & have a nice sunday :slight_smile:

You are looking to the timezone in your Debian, which is only the host of your All-In-One. The Nextcloud runs in a Docker Container with its own timezone.

You have to set your Timezone (Europe/Berlin) in the All-In-One Frontend:

image
Therefore you have to stop your containers, then the option to set your timezone gets visible:

image

hth.


Much and good luck,
ernolf

Hi @ernolf - thanks for your reply!

I stopped all containers and checked the value on the AIO-interface. It was already set to Europe/Berlin. So…I have set the timezone for Nextcloud both in the AIO-Interface and in the config.php to “Europe/Berlin”.

In the AIO-Interface it looks like this:
(after just stopping the containers and not changing the value)

AIO-Timezone

And in the config.php it looks like this:

  'default_timezone' => 'Europe/Berlin',

I would have expected that Nextcloud looks at at least one of these settings, but it seems to ignore both…

Kind regards :slight_smile:

that is not where you have to look for the >IS< state.

You should look at the place in the first screen while the containers are up and running:

image

The Screen you mentioned only shows a suggestion. You should of course enter that as value and click on “Submit timezone”

“Europe/Berlin” is only the Placeholder in that field, which is shown allways, regardles of what value is set.

The placeholder in an HTML form field is only a visual cue for the user. It is shown in the text field as long as the user does not enter their own value, but is not used as the actual value of the form field on submit if the user leaves the field blank.

So if you leave the field blank on submit and only the “Europe/Berlin” placeholder is shown, that value will not be sent. In order for the “Europe/Berlin” value to be sent when the form is submitted, you must actually enter it in the field.


ernolf

2 Likes

This is how you can see the timezone of the container runing Nextcloud:

sudo docker exec -it nextcloud-aio-nextcloud bash -c date

ernolf

2 Likes

Yes! That did it! Now the timezone is set to CEST:

$ sudo docker exec -it nextcloud-aio-nextcloud bash -c date
Sun Oct  6 20:07:55 CEST 2024
$

Thank you very much!

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