Comments (5)
What are valid time zone values for the TZ variable?
Short answer, these, but at the bottom of the comment I include a better solution:
/ # cd /opt/SickGear/lib/pytz/zoneinfo/
/opt/SickGear/lib/pytz/zoneinfo # ls -R
.:
CET Eire GMT-0 Israel MST7MDT Portugal Universal zone.tab
CST6CDT Etc GMT0 Jamaica NZ ROC W-SU zone1970.tab
Cuba Factory Greenwich Japan NZ-CHAT ROK WET
EET GB HST Kwajalein Navajo Singapore Zulu
EST GB-Eire Hongkong Libya PRC Turkey iso3166.tab
EST5EDT GMT Iceland MET PST8PDT UCT leapseconds
Egypt GMT+0 Iran MST Poland UTC tzdata.zi
./Etc:
GMT GMT+11 GMT+4 GMT+8 GMT-10 GMT-14 GMT-5 GMT-9 UTC
GMT+0 GMT+12 GMT+5 GMT+9 GMT-11 GMT-2 GMT-6 GMT0 Universal
GMT+1 GMT+2 GMT+6 GMT-0 GMT-12 GMT-3 GMT-7 Greenwich Zulu
GMT+10 GMT+3 GMT+7 GMT-1 GMT-13 GMT-4 GMT-8 UCT
Long answer:
I took a look at the Dockerfile to look for timezone hints, searching it for 'tz' pointed me to these lines:
&& export TMP=/tmp/sgtemp/ \
&& mkdir -p ${TMP} \
&& find ./lib/pytz/zoneinfo/ -maxdepth 1 -type f -exec cp -p '{}' ${TMP} \; \
&& cp -rp ./lib/pytz/zoneinfo/Etc ${TMP} \
&& rm -rf ./lib/pytz/zoneinfo/* \
&& cp -rp ${TMP}* ./lib/pytz/zoneinfo/ \
Here it's copying a small subset of the possible timezones to a temporary folder (excluding the America/New_York I tried in the OP), wiping out the original full list of time zones, and then copying the shortened list back to the running directory. So that's the origin of the short list of time zones above.
Time to experiment. I spun up a test SickGear container, and added a volume mapping. I still have SickGear locally installed, and that folder has the full suite of time zones in it there. So I mapped that folder on top of the container's folder, and tried my desired time zone:
version: "3"
services:
sickgear:
container_name: sickgeartest
image: sickgear/sickgear:latest
environment:
- APP_UID=1000
- APP_GID=1000
- TZ=America/New_York
ports:
- 8082:8081/tcp
volumes:
- C:\path\to\zoneinfo:/opt/SickGear/lib/pytz/zoneinfo
Huzzah, it booted and accepted the new time zone. I then copied the zoneinfo folder to my host's working folder for my actual SickGear docker container, and made the changes to my main SickGear docker compose file. It's working so far. So the better solution is:
- Download this folder to your host's base folder for your SickGear container.
- Add a volume mapping in your compose file or run command that maps the downloaded zoneinfo folder to
/opt/SickGear/lib/pytz/zoneinfo
- Set your TZ variable to the TZ identifier you need.
from sickgear.docker.
make sure your system has UTC and use it TZ=UTC
from sickgear.docker.
I don’t understand. The only acceptable time zone for that variable is UTC? I don’t live in the UTC time zone.
from sickgear.docker.
So UTC is Universal Time Coordinated , that is universal to all, including you.
Please set up like the docs say, there is nothing more I can advise as I am not a docker user. Perhaps someone in the community can help (I doubt it though). This docker has been running YEARS and no one has raised this issue.
So, if you cannot get the docker to work the way you like, then i recommend you run the normal app, which is mature.
from sickgear.docker.
Warning, there are unexpected results from your suggestion. Though the bundled third party pytz
library has other timezones, UTC
is the only one supported in the application. For example, trigger times for certain operations may produce unexpected results. Good luck though.
from sickgear.docker.
Related Issues (6)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sickgear.docker.