How do I properly set the timezone? #1144
Unanswered
Tr33x0rs
asked this question in
Community Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Let me start off by saying that I have minimal Linux knowledge and zero Docker knowledge. I was able to stumble through the wiki and get my server and clients setup but I'm struggling to set the correct timezone. This is more of an annoyance but I'm trying to set the correct timezone so that my "Last Activity" times are be correct. I'm running Docker in Windows 10.
I figured out that I can go to Exec in docker for "hashtopolis-backend" and run date to see the current time. I've tried "ln -sf /usr/share/zoneinfo/America/Denver /etc/localtime" but get a permission denied error. I then tried "sudo ln -sf /usr/share/zoneinfo/America/Denver /etc/localtime" and received a "/bin/sh: 2: sudo: not found" error. From the research I've tried to do it looks like running commands and sudo is different in docker. I also saw a recommendation to declare the timezone in the docker-compose.yml although I'm not sure if I did it correctly.
version: '3.7'
services:
hashtopolis-backend:
container_name: hashtopolis-backend
image: hashtopolis/backend:latest
restart: always
volumes:
- hashtopolis:/usr/local/share/hashtopolis:Z
environment:
HASHTOPOLIS_DB_USER: $MYSQL_USER
HASHTOPOLIS_DB_PASS: $MYSQL_PASSWORD
HASHTOPOLIS_DB_HOST: $HASHTOPOLIS_DB_HOST
HASHTOPOLIS_DB_DATABASE: $MYSQL_DATABASE
HASHTOPOLIS_ADMIN_USER: $HASHTOPOLIS_ADMIN_USER
HASHTOPOLIS_ADMIN_PASSWORD: $HASHTOPOLIS_ADMIN_PASSWORD
HASHTOPOLIS_APIV2_ENABLE: $HASHTOPOLIS_APIV2_ENABLE
- TZ=America/Denver
Although this is me being picky and not technically a problem it is driving me crazy. Any help is greatly appreciated! Also is this the best place to ask for help? I looked for a subreddit or somewhere else to ask help but ultimately ended up here. Thank you again.
Beta Was this translation helpful? Give feedback.
All reactions