How do I configure Portainer to use the local time? #9342
Replies: 53 comments 7 replies
-
|
Portainer uses the default logging library Also, I don't think that the You could also try to bindmount |
Beta Was this translation helpful? Give feedback.
-
|
Bind mount |
Beta Was this translation helpful? Give feedback.
-
|
Sorry to necro this, but is there any chance that |
Beta Was this translation helpful? Give feedback.
-
|
What about using the workaround above @nemchik ? |
Beta Was this translation helpful? Give feedback.
-
|
The volume works, but I'm still interested in TZ if it would be considered. |
Beta Was this translation helpful? Give feedback.
-
|
Not planned yet as we'd rather keep using the |
Beta Was this translation helpful? Give feedback.
-
|
I appreciate the consideration! |
Beta Was this translation helpful? Give feedback.
-
|
I recently installed Portainer in a mac OS host and run into the same issue. Anyone found a workaround for mac OS hosts? Is not a big deal but the time in the logs is about 4hs ahead of my local time. |
Beta Was this translation helpful? Give feedback.
-
|
Hi everyone - I posted another issue regarding this referenced as 3093, nothing I do following the guides here has worked. Hoping someone can help figure this out. Using Linux (specifically Raspbian Buster) as the host system. |
Beta Was this translation helpful? Give feedback.
-
|
@deviantony @ncresswell what are our plans for timezone support in Portainer? I know there is a logging extension in the plans which I assume would require support for timezones?.. |
Beta Was this translation helpful? Give feedback.
-
|
Any updates on this? |
Beta Was this translation helpful? Give feedback.
-
|
@sfkpmr I can now confirm the next extension will be logging/auditing, which I mentioned previously will likely imply timezone support. Unfortunately I can't give you an exact ETA on this, as current development efforts are focused on k8s support and an EE build of Portainer (releasing to the public soon). Following the release of these, our focus will be back on extensions. |
Beta Was this translation helpful? Give feedback.
-
|
Seems that binding |
Beta Was this translation helpful? Give feedback.
-
I can confirm, that it was working some months ago, but after some updates of docker and portainer, it stop working. My system in Debian 10 and portainer is 1.23.2. |
Beta Was this translation helpful? Give feedback.
-
I fix-it with adding ENV variable TZ=Your/Timezone |
Beta Was this translation helpful? Give feedback.
-
|
Not to be a complainer BUT this has been an open issue for 5 years..... Things that don't work: (don't change from UTC to local zone)
Can someone either look at fixing the ENV support or as was "potentially" offered switch to your own logging solution so we can get accurate Portainer generated timestamps in logs. Thank you for any assistance you can provide. I'd be happy to help as well if you need some dev time. Just seems foolish for such a polished solution. Thanks again. |
Beta Was this translation helpful? Give feedback.
-
|
Hi, I'm using the alpine version, and not have tzdata installed, that's why doesn't recognize de TZ variable. For example, in the Dockerfile, add the following lines: ENV TZ=America/Argentina/Cordoba RUN apk --no-cache add tzdata && rm -rf /var/cache/apk/* Works for me. Best regards!! |
Beta Was this translation helpful? Give feedback.
-
|
I also added tzdata, now the time is right. |
Beta Was this translation helpful? Give feedback.
-
I don't think any version has tzdata installed. |
Beta Was this translation helpful? Give feedback.
-
I literally copy pasted what you just put, and no luck either... I mean, the time is correct in the Portainer itself, but the timestamps are all wrong, and I have tried countless workarounds but no luck... I think it is just impossible, for reference, this is how my Dockerfile looks like:
|
Beta Was this translation helpful? Give feedback.
-
|
Since this issue has been going on for so long, & workarounds keep getting worked-out of the system, can I suggest maybe making it an option in the settings within Portainer? Like in the Host settings or Account/Server settings. A little I can understand it using UTC as a default as you could have servers spread out & that keeps everything coordinated, but there are also plenty of reasons that's not ideal or even unusable for many. Having it as a UI setting prevents it from being defaut-set because people copy-pasted from a guide or whatever, but still gives a way to change it that makes it clear what it does |
Beta Was this translation helpful? Give feedback.
-
|
Wait...this is STILL not a thing?!?! WTF... |
Beta Was this translation helpful? Give feedback.
-
|
Hi! After some testing for a work around there are two methods we have confirmed to work. Using /usr/share/zoneinfo, for example
The timezone is case sensitive, it must match the directory under Using localtime.
These two methods will allow you to set your preferred timezone |
Beta Was this translation helpful? Give feedback.
-
|
Still no fix :D ? |
Beta Was this translation helpful? Give feedback.
-
|
Would be nice to change the time in portainer container logs. Have tried everything listed above and nothing. None worked in compose. |
Beta Was this translation helpful? Give feedback.
-
|
Seems move to discussion means bury issue (as was the case with another long standing item push docker compose files from portainer too GitHub). While I might not LIKE having an issue closed as not to be fixed I DO RESPECT it is their choice as owners oof code what they choose... but this.... this just burying the issue by moving out of bug tracking which it clearly is (lack of respect for TZ settings), is NOT an honorable way to conduct business, and only would inspire another bug to be filed by someone who is unaware of this "silent" decision.... PLEASE reconsider both the "decision" to not address this and the move to turn this into a discussion. I think time to discuss is over we all understand the issue/what can be done to mitigate impact and what CAN'T BE DONE locally to display local TZ timestamps in portainer logs. Thank you. |
Beta Was this translation helpful? Give feedback.
-
So, while I agree that this is something that should be fixed, if it was closed because the developer acknowledged the issue & decided that they did not think it worth their time to fix, which seems like the case here, then keeping it open is not appropriate. Think of it this way; Your friend takes you to a party at some guy name Portainer's house. There is food to eat & you choose to grab a hamburger. You like the hamburger but wish that it had soy sauce on it. You find a handful of other people who also want soy sauce on their burgers. You all look for soy sauce but don't find any. You ask if there's some soy sauce but the host is busy doing a bunch of things & doesn't have time to answer you. You write on a whiteboard in a room at the party "Is there any soy sauce?" Someone at the party who's more familiar with the host writes under it "I looked & didn't see any, I don't think there's any in the house." You write under it "When someone goes to the store to get more ice can they grab some?" because you know it's such a bog party that people will be going to the store multiple times to get ice... Okay, it's not a perfect analogy, but bare with me... Someone writes back "I'll let people know, but none of us see any reason to put soy sauce on a hamburger." You reply back "I get that but there's dozens of us here looking & we keep finding others who ask if there's any soy sauce." You get a response that says "It looks like nobody here is willing to go grab it, if one of you want to grab some we'll make sure it's not going to cause anyone an allergic reaction &, if not, we'll put it out with the hamburgers" You reply "But it's not expensive, I'd be willing to buy it, but I can't drive" To which the whiteboard is wiped clean to make room for other things, but the conversation is transferred to a small notebook in the reading room because this is a really nice house or something |
Beta Was this translation helpful? Give feedback.
-
|
A while back we moved to using discussions for questions and feature requests, keeping issues for bug reports exclusively. This is to let us gauge community feedback more easily and to facilitate wider discussion on ideas and implementation. Doing this does not change the way we approach or prioritize feature requests in any way - in fact, the new approach gives us more insight into feature requests than we had previously. Closing the old issue in favor of this discussion was in no way closing or ignoring the feature request, it was simply a reorganization of how we categorize and track feature requests. In terms of this particular issue, you could argue both ways about whether this is a bug or a missing feature. We've decided to look at it as a missing feature, and opened an internal issue around it late last year which we are actively pursuing. It looks like we missed indicating that we'd done so here at the time, and we're sorry that this was missed. I don't have an ETA on when this might make it into the product at this stage, but rest assured we aren't ignoring it. There was also some initial confusion around the issue as to whether it related to the logs of the Portainer container itself, or to the logs of other containers viewed through Portainer. The feature request is focused on the latter of the two. Bear in mind also that we are a small team working on a number of features and bug fixes across a wide ranging product, so we need to prioritize our time accordingly. We have a knowledge base article which outlines our process around bug and feature prioritization. I appreciate this might not necessarily be the answer you're looking for, but hopefully it adds a bit of clarity around where we're at with it and with our general processes.
|
Beta Was this translation helpful? Give feedback.
-
|
Hi from late 2025. This timezone nonsense is annoying. any plans to resolve? |
Beta Was this translation helpful? Give feedback.
-
|
居然是一个延续这么多年的问题 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Typically, I set TZ environment variable in every container in my
docker-compose.yml, but Portainer doesn't seem to honor that.Here's the timestamp on server log:-
Both Jenkins and Nexus containers have TZ environment variable set accordingly, and they are displaying the correct local time.
Thank you.
Beta Was this translation helpful? Give feedback.
All reactions