[GH-ISSUE #1400] Setting timezone in docker compose has no effect #8656

Closed
opened 2026-04-30 04:39:40 -05:00 by GiteaMirror · 10 comments
Owner

Originally created by @Ahim13 on GitHub (Sep 2, 2025).
Original GitHub issue: https://github.com/fosrl/pangolin/issues/1400

Hi,

I'm having problems with 2FA, found out the issue is the time difference.
Pangolin using UTC. Tried to change the docker compose with no success.

I tried adding the environment variable TZ=Budapest
and also tried adding these to the volumes:

    - "/etc/timezone:/etc/timezone:ro"
    - "/etc/localtime:/etc/localtime:ro" 

Still after recreating the containers, it says UTC when execing into it and giving the date command.

Any solution to change the timezone for the Pangolin container?

Originally created by @Ahim13 on GitHub (Sep 2, 2025). Original GitHub issue: https://github.com/fosrl/pangolin/issues/1400 Hi, I'm having problems with 2FA, found out the issue is the time difference. Pangolin using UTC. Tried to change the docker compose with no success. I tried adding the environment variable TZ=Budapest and also tried adding these to the volumes: ``` volumes: - "/etc/timezone:/etc/timezone:ro" - "/etc/localtime:/etc/localtime:ro" ``` Still after recreating the containers, it says UTC when execing into it and giving the date command. Any solution to change the timezone for the Pangolin container?
GiteaMirror added the stale label 2026-04-30 04:39:40 -05:00
Author
Owner

@hussainalhaddad commented on GitHub (Sep 2, 2025):

I tried adding the environment variable TZ=Budapest and also tried adding these to the volumes:

Hi @Ahim13

TZ must be in format TZ=Europe/Budapest

<!-- gh-comment-id:3245703861 --> @hussainalhaddad commented on GitHub (Sep 2, 2025): > I tried adding the environment variable TZ=Budapest and also tried adding these to the volumes: Hi @Ahim13 TZ must be in format TZ=Europe/Budapest
Author
Owner

@Ahim13 commented on GitHub (Sep 2, 2025):

yes, sorry in the example I wrote it incorrectly
I am using TZ=Europe/Budapest also tried TZ: Europe/Budapest in the compose file

<!-- gh-comment-id:3245710495 --> @Ahim13 commented on GitHub (Sep 2, 2025): yes, sorry in the example I wrote it incorrectly I am using TZ=Europe/Budapest also tried TZ: Europe/Budapest in the compose file
Author
Owner

@oschwartz10612 commented on GitHub (Sep 2, 2025):

Usually 2fa works fine if the time of the server is UTC and not your
local time zone because its smart enough to know the time difference.
Usually this becomes a problem if the actual time is wrong like a couple
of minutes off - is that the case?

<!-- gh-comment-id:3246111039 --> @oschwartz10612 commented on GitHub (Sep 2, 2025): Usually 2fa works fine if the time of the server is UTC and not your local time zone because its smart enough to know the time difference. Usually this becomes a problem if the actual time is wrong like a couple of minutes off - is that the case?
Author
Owner

@Ahim13 commented on GitHub (Sep 2, 2025):

The minutes are accurate / correct, only the hours are off as its in UTC and not CEST.
So far that's the only possible cause I found why 2FA wouldnt work.

<!-- gh-comment-id:3246548077 --> @Ahim13 commented on GitHub (Sep 2, 2025): The minutes are accurate / correct, only the hours are off as its in UTC and not CEST. So far that's the only possible cause I found why 2FA wouldnt work.
Author
Owner

@oschwartz10612 commented on GitHub (Sep 4, 2025):

Funny question but is the time on your computer off at all? It should be
correct in minutes and seconds.

Have you tried both UTC and CEST and neither work?

<!-- gh-comment-id:3254901920 --> @oschwartz10612 commented on GitHub (Sep 4, 2025): Funny question but is the time on your computer off at all? It should be correct in minutes and seconds. Have you tried both UTC and CEST and neither work?
Author
Owner

@Ahim13 commented on GitHub (Sep 10, 2025):

The minutes and seconds both are correct, only the hours differ, everything else matches.

How do you mean I tried UTC and CEST? Change the region of my phone to UTC to match the the docker region?

I tried changin the docker (Pangolin) region/time to CEST but that did not work, it just wont go to CEST, always shows UTC time.

<!-- gh-comment-id:3273889710 --> @Ahim13 commented on GitHub (Sep 10, 2025): The minutes and seconds both are correct, only the hours differ, everything else matches. How do you mean I tried UTC and CEST? Change the region of my phone to UTC to match the the docker region? I tried changin the docker (Pangolin) region/time to CEST but that did not work, it just wont go to CEST, always shows UTC time.
Author
Owner

@github-actions[bot] commented on GitHub (Sep 25, 2025):

This issue has been automatically marked as stale due to 14 days of inactivity. It will be closed in 14 days if no further activity occurs.

<!-- gh-comment-id:3331156156 --> @github-actions[bot] commented on GitHub (Sep 25, 2025): This issue has been automatically marked as stale due to 14 days of inactivity. It will be closed in 14 days if no further activity occurs.
Author
Owner

@iconoclasthero commented on GitHub (Oct 2, 2025):

Hi,

I'm having problems with 2FA, found out the issue is the time difference. Pangolin using UTC. Tried to change the docker compose with no success.

I tried adding the environment variable TZ=Budapest and also tried adding these to the volumes:

    - "/etc/timezone:/etc/timezone:ro"
    - "/etc/localtime:/etc/localtime:ro" 

Still after recreating the containers, it says UTC when execing into it and giving the date command.

Any solution to change the timezone for the Pangolin container?

#1025
https://github.com/orgs/fosrl/discussions/1025

<!-- gh-comment-id:3361046111 --> @iconoclasthero commented on GitHub (Oct 2, 2025): > Hi, > > I'm having problems with 2FA, found out the issue is the time difference. Pangolin using UTC. Tried to change the docker compose with no success. > > I tried adding the environment variable TZ=Budapest and also tried adding these to the volumes: > > ``` > - "/etc/timezone:/etc/timezone:ro" > - "/etc/localtime:/etc/localtime:ro" > ``` > > Still after recreating the containers, it says UTC when execing into it and giving the date command. > > Any solution to change the timezone for the Pangolin container? #1025 https://github.com/orgs/fosrl/discussions/1025
Author
Owner

@github-actions[bot] commented on GitHub (Oct 17, 2025):

This issue has been automatically marked as stale due to 14 days of inactivity. It will be closed in 14 days if no further activity occurs.

<!-- gh-comment-id:3413339319 --> @github-actions[bot] commented on GitHub (Oct 17, 2025): This issue has been automatically marked as stale due to 14 days of inactivity. It will be closed in 14 days if no further activity occurs.
Author
Owner

@github-actions[bot] commented on GitHub (Oct 31, 2025):

This issue has been automatically closed due to inactivity. If you believe this is still relevant, please open a new issue with up-to-date information.

<!-- gh-comment-id:3470803514 --> @github-actions[bot] commented on GitHub (Oct 31, 2025): This issue has been automatically closed due to inactivity. If you believe this is still relevant, please open a new issue with up-to-date information.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/pangolin#8656