Explore adding variable to define users time zone so that logs can read correct user side time, please?
Originally created by @blaine07 on GitHub (Mar 23, 2025).
Original GitHub issue: https://github.com/fosrl/newt/issues/23
Explore adding variable to define users time zone so that logs can read correct user side time, please?
<!-- gh-comment-id:2754859805 -->
@Lokowitz commented on GitHub (Mar 26, 2025):
If you are using Docker you can mount the volume for `localtime `and `timezone` of your host system.
just add this to your compose.yml:
```
volumes:
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
```
<!-- gh-comment-id:2755161497 -->
@blaine07 commented on GitHub (Mar 26, 2025):
> If you are using Docker you can mount the volume for `localtime `and `timezone` of your host system.
>
> just add this to your compose.yml:
>
> ```
> volumes:
> - /etc/timezone:/etc/timezone:ro
> - /etc/localtime:/etc/localtime:ro
> ```
...will that work in Unraid?
The way unraid templates work you don’t/can’t really just edit the compose file though.
<!-- gh-comment-id:2764596104 -->
@blaine07 commented on GitHub (Mar 30, 2025):
The way unraid templates work you don’t/can’t really just edit the compose file though.
@blaine07 You can add volumes/ports/variables through the Unraid GUI which do the same thing.
<!-- gh-comment-id:2764634416 -->
@miloschwartz commented on GitHub (Mar 30, 2025):
@blaine07 You can add volumes/ports/variables through the Unraid GUI which do the same thing.
@blaine07 You can add volumes/ports/variables through the Unraid GUI which do the same thing.
So I’ll be able to add this as a variable? Will the variable be “LOGGER_TIMEZONE”? In which case it would be “America/Chicago” for me for example?
<!-- gh-comment-id:2764902348 -->
@blaine07 commented on GitHub (Mar 31, 2025):
> [@blaine07](https://github.com/blaine07) You can add volumes/ports/variables through the Unraid GUI which do the same thing.
So I’ll be able to add this as a variable? Will the variable be “LOGGER_TIMEZONE”? In which case it would be “America/Chicago” for me for example?
@oschwartz10612 commented on GitHub (Mar 31, 2025):
So I’ll be able to add this as a variable? Will the variable be “LOGGER_TIMEZONE”? In which case it would be “America/Chicago” for me for example?
Yep Ill merge this soon and it will be in the next release
<!-- gh-comment-id:2764911145 -->
@oschwartz10612 commented on GitHub (Mar 31, 2025):
> So I’ll be able to add this as a variable? Will the variable be “LOGGER_TIMEZONE”? In which case it would be “America/Chicago” for me for example?
Yep Ill merge this soon and it will be in the next release
So I’ll be able to add this as a variable? Will the variable be “LOGGER_TIMEZONE”? In which case it would be “America/Chicago” for me for example?
Yep Ill merge this soon and it will be in the next release
All the thanks! 🙏🙌
<!-- gh-comment-id:2764914989 -->
@blaine07 commented on GitHub (Mar 31, 2025):
> > So I’ll be able to add this as a variable? Will the variable be “LOGGER_TIMEZONE”? In which case it would be “America/Chicago” for me for example?
>
> Yep Ill merge this soon and it will be in the next release
All the thanks! 🙏🙌
This doesn't/didn't appear to work - added to Unraid as we discussed and shown. See attached image of log - no change to time.
<!-- gh-comment-id:2781760355 -->
@blaine07 commented on GitHub (Apr 7, 2025):


This doesn't/didn't appear to work - added to Unraid as we discussed and shown. See attached image of log - no change to time.
@oschwartz10612 commented on GitHub (Apr 7, 2025):
Hum maybe this has something to do with Unraid and the time on your machine? I was able to get it working for my own test. My computer is in the America/New_York region.
Hum maybe this has something to do with Unraid and the time on your machine? I was able to get it working for my own test. My computer is in the America/New_York region.
I did this; now it says this; it's 2011 MY TIME right now:
<!-- gh-comment-id:2781796442 -->
@blaine07 commented on GitHub (Apr 7, 2025):
> If you are using Docker you can mount the volume for `localtime `and `timezone` of your host system.
>
> just add this to your compose.yml:
>
> ```
> volumes:
> - /etc/timezone:/etc/timezone:ro
> - /etc/localtime:/etc/localtime:ro
> ```
I did this; now it says this; it's 2011 MY TIME right now:

@oschwartz10612 commented on GitHub (Apr 7, 2025):
Is that with the timezone mount and with the env var? If not does both do anything?
<!-- gh-comment-id:2781797861 -->
@oschwartz10612 commented on GitHub (Apr 7, 2025):
Is that with the timezone mount and with the env var? If not does both do anything?
Is that with the timezone mount and with the env var? If not does both do anything?
Even tried this as it works for other containers; no dice:
<!-- gh-comment-id:2781799765 -->
@blaine07 commented on GitHub (Apr 7, 2025):
> Is that with the timezone mount and with the env var? If not does both do anything?


Even tried this as it works for other containers; no dice:

User above just mentioned doing the two VOLUMES - only VAR I tried was last image. Not sure what VARs youd recommend I try?
Oh this was set, too:
<!-- gh-comment-id:2781800602 -->
@blaine07 commented on GitHub (Apr 7, 2025):
User above just mentioned doing the two VOLUMES - only VAR I tried was last image. Not sure what VARs youd recommend I try?
Oh this was set, too:

On this container running "apk add tzdata" was the resolution.
I have never had to manually install tzdata for any other Unraid container ever - is there some way to get this "baked into" Newt so that in the future when this gets re-installed on Unraid it doesn't present itself as issue?
<!-- gh-comment-id:2783019916 -->
@blaine07 commented on GitHub (Apr 7, 2025):


On this container running "apk add tzdata" was the resolution.
I have never had to manually install tzdata for any other Unraid container ever - is there some way to get this "baked into" Newt so that in the future when this gets re-installed on Unraid it doesn't present itself as issue?
@oschwartz10612 commented on GitHub (Apr 7, 2025):
Ahh good find! Yes I can add that to the Dockerfile! Ill do that and make a patch release.
<!-- gh-comment-id:2783398859 -->
@oschwartz10612 commented on GitHub (Apr 7, 2025):
Ahh good find! Yes I can add that to the Dockerfile! Ill do that and make a patch release.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Originally created by @blaine07 on GitHub (Mar 23, 2025).
Original GitHub issue: https://github.com/fosrl/newt/issues/23
Explore adding variable to define users time zone so that logs can read correct user side time, please?
@Lokowitz commented on GitHub (Mar 26, 2025):
If you are using Docker you can mount the volume for
localtimeandtimezoneof your host system.just add this to your compose.yml:
@blaine07 commented on GitHub (Mar 26, 2025):
...will that work in Unraid?
@oschwartz10612 commented on GitHub (Mar 30, 2025):
I think it should work on unraid - it is just linux
@blaine07 commented on GitHub (Mar 30, 2025):
The way unraid templates work you don’t/can’t really just edit the compose file though.
@miloschwartz commented on GitHub (Mar 30, 2025):
@blaine07 You can add volumes/ports/variables through the Unraid GUI which do the same thing.
@blaine07 commented on GitHub (Mar 31, 2025):
So I’ll be able to add this as a variable? Will the variable be “LOGGER_TIMEZONE”? In which case it would be “America/Chicago” for me for example?
@oschwartz10612 commented on GitHub (Mar 31, 2025):
Yep Ill merge this soon and it will be in the next release
@blaine07 commented on GitHub (Mar 31, 2025):
All the thanks! 🙏🙌
@blaine07 commented on GitHub (Apr 7, 2025):
This doesn't/didn't appear to work - added to Unraid as we discussed and shown. See attached image of log - no change to time.
@oschwartz10612 commented on GitHub (Apr 7, 2025):
Hum maybe this has something to do with Unraid and the time on your machine? I was able to get it working for my own test. My computer is in the America/New_York region.
@blaine07 commented on GitHub (Apr 7, 2025):
Id imagine you're right - but I still don't know what to do/how to fix it? LOL
@blaine07 commented on GitHub (Apr 7, 2025):
I did this; now it says this; it's 2011 MY TIME right now:
@oschwartz10612 commented on GitHub (Apr 7, 2025):
Is that with the timezone mount and with the env var? If not does both do anything?
@blaine07 commented on GitHub (Apr 7, 2025):
Even tried this as it works for other containers; no dice:
@blaine07 commented on GitHub (Apr 7, 2025):
User above just mentioned doing the two VOLUMES - only VAR I tried was last image. Not sure what VARs youd recommend I try?
Oh this was set, too:
@blaine07 commented on GitHub (Apr 7, 2025):
@blaine07 commented on GitHub (Apr 7, 2025):
On this container running "apk add tzdata" was the resolution.
I have never had to manually install tzdata for any other Unraid container ever - is there some way to get this "baked into" Newt so that in the future when this gets re-installed on Unraid it doesn't present itself as issue?
@oschwartz10612 commented on GitHub (Apr 7, 2025):
Ahh good find! Yes I can add that to the Dockerfile! Ill do that and make a patch release.