TDengine
TDengine copied to clipboard
Timezone problem in container
In version 3.0.0.1, the default timezone of the taosd by SELECT TIMEZONE(); is Asia/Shanghai.
However, when insert new rocords to database, the timestamp is parsed to Etc/UTC. And if docker exec -it tdengine bash then type timedatectl with the prompt of container, it also told Etc/UTC.
Can you fix it? Thanks in advance.
the default value of timezone depends on your host machine's time zone
Well, my host's timezone is Asia/Shanghai so it is indeed same in taosd returned by SELECT TIMEZONE();.
However the timezone of the container is Etc/UTC, and the records inserted are converted to this timezone as well (has 8 hours as difference). Can you reproduce it?
For I use TDengine in production, maybe my tone smells a little anxious. I'm sorry for that.