ruimarinho / docker-bitcoin-core

A bitcoin-core docker image
https://hub.docker.com/r/ruimarinho/bitcoin-core/
MIT License
365 stars 209 forks source link

How to set the time zone? #61

Closed qq592304796 closed 5 years ago

qq592304796 commented 5 years ago
docker run -d --name bitcoin-server -p 18332:18332 -p 18333:18333 \
    -e TZ=Asia/Shanghai \
    -v /usr/share/zoneinfo/Asia/Shanghai:/usr/share/zoneinfo/Asia/Shanghai:ro \
    -v /etc/localtime:/etc/localtime:ro \
    -v /etc/timezone:/etc/timezone \
    -v /home/data/btc/data:/home/bitcoin/.bitcoin \
    ruimarinho/bitcoin-core:0.16.2 \
    -printtoconsole -testnet \
    -rpcauth='admin:bf5ff4cd8cb1a885c35f68fde11e122$8bd560b76fe6d663854351da53f5e290bc50cf8ad262501dde8b9ee210f4ca0a'

but the date printed by the console is still UTC plase help me,tks

ruimarinho commented 5 years ago

@qq592304796 that is correct (and maybe the TZ env var would be enough), but bitcoind will always output the log time as UTC independently of local settings.

qq592304796 commented 5 years ago

@ruimarinho I seem to have found out that block synchronization is also based on UTC time. thanks