tchapi / davis

🗓 A simple, fully translatable admin interface for sabre/dav based on Symfony 5 and Bootstrap 5, initially inspired by Baïkal.

Home Page:https://github.com/users/tchapi/projects/1/views/1

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Timezone set

KeJyLL opened this issue · comments

First of all, thanks for your great work!

I just tried to update my container with the new enviroment options "APP_TIMEZONE", but it seems doesn't working.

davis:
    image: ghcr.io/tchapi/davis:v4.4.1
    container_name: davis
    environment:
      - APP_ENV=prod
      - DATABASE_DRIVER=sqlite
      - DATABASE_URL=sqlite:////data/davis-database.db # ⚠️ 4 slashes for an absolute path ⚠️ + no quotes (so Symfony can resolve it)
      - MAILER_DSN=smtp://${MAIL_USERNAME}:${MAIL_PASSWORD}@${MAIL_HOST}:${MAIL_PORT}
      - ADMIN_LOGIN=${ADMIN_LOGIN}
      - ADMIN_PASSWORD=${ADMIN_PASSWORD}
      - AUTH_REALM=${AUTH_REALM}
      - AUTH_METHOD=${AUTH_METHOD}
      - CALDAV_ENABLED=${CALDAV_ENABLED}
      - CARDDAV_ENABLED=${CARDDAV_ENABLED}
      - WEBDAV_ENABLED=${WEBDAV_ENABLED}
      - WEBDAV_TMP_DIR=${WEBDAV_TMP_DIR}
      - WEBDAV_PUBLIC_DIR=${WEBDAV_PUBLIC_DIR}
      - INVITE_FROM_ADDRESS=${INVITE_FROM_ADDRESS}
#      - WEBDAV_PUBLIC_DIR=/webdav
      - APP_TIMEZONE="Europe/Berlin"
    volumes:
      - davis_www:/var/www/davis
      - davis_data:/data
    restart: always

I also tried the other way with the .env (I haven't forget to set back the enviroment from earlier to
- APP_TIMEZONE=${TIMEZONE}
Furthermore I tried to cause an error with this line:
TIMEZONE=Europasde/Paris

On the webGUI, I get everytime this:
grafik

I also checked the following file (it's empty):
/usr/local/etc/php/conf.d/timezone.ini

Hi @KeJyLL

Thanks for the kind words.

You can see my actual, production implementation here so I think setting it should work (minus the quotes, but that's a detail)

Your container is not running v4.4.1 in fact: The "Server timezone" label has been renamed to "App timezone" (see here) so I suspect that your container did not correctly update.

This can happen if you share the volume with another container (which is you case here, with a reverse-proxy I assume). In this case, when recreating the container, the volume files remain and take precedence. I would advise to read this specific paragraph and do what is indicated to correctly update your container (note: I may add this in the README of Davis at some point)

I also checked the following file (it's empty): /usr/local/etc/php/conf.d/timezone.ini

That's expected: setting an ini variable in the PHP runtime does not change the disk-based configuration

You're right!

I was missing the two lines above, there I've seen the Davis version.
Your update lines were working like a charme.
I think I had to this once or should I do this everytime I update the Container?

Anyway, thank you so much.

It's every time you update (AFAIK)

Sorry for the late Answer.
I was just thinking about and maybe found a workaround.
Could a separate mount for timezone.ini be a solution?

Hi @KeJyLL

I wouldn't push for it as it's not really maintainable but you can do it on your container if you wish, yes

That's true. If something happens wrong, this becomes something special.
I'll take a look, what's else practicable to keep updating as simple as possible.
Thanks for quick reply.