taskwarrior-webui icon indicating copy to clipboard operation
taskwarrior-webui copied to clipboard

Set time zone on backend

Open ShizuhaAki opened this issue 3 years ago • 1 comments

I'm trying to set the time zone in the docker container with this:

date -s "$(date -Iseconds | sed "s/\\+[0-9\:]+//g;s/T/ /g;s/14/22/g" -r)"

But it denied me permission to do so. How to properly configure the time zone?

Using export TZ=Asia/Shanghai also failed.

ShizuhaAki avatar Apr 30 '22 15:04 ShizuhaAki

I think you can try setting the environment variable when creating the container instead of changing it at runtime.

For example, you can use the -e option in docker command:

docker run -e TZ=Asia/Shanghai -d -p 8080:80 --name taskwarrior-webui \
	-v $HOME/.taskrc:/.taskrc -v $HOME/.task:/.task \
	dcsunset/taskwarrior-webui

Feel free to comment here if it doesn't work for you.

DCsunset avatar May 02 '22 01:05 DCsunset