How can I change timezone from UTC?
I have tried to run container with switch -e TZ=Europe/Helsinki . After that when I run date inside container I get correct time and timezone. But when I run docker logs -f elastalert I see logs with UTC timezone. Also I have tried to run this command inside container without success:
ln -sf /usr/share/zoneinfo/Europe/Helsinki /etc/localtime
echo "Europe/Helsinki" > /etc/timezone
Also I have tried to change TZ variable inside Dockerfile and build image, same issue.
Hello!!
I think that I'm having the same problem. In docker container when I execute:
docker exec -it elastalert date
I get my timezone (CEST) correctly, the same as if I execut date in my OS, but when I test a rule I get this:
silence - {'rule_name': 'Prueba blacklist', '@timestamp': datetime.datetime(2019, 4, 3, 6, 19, 48, 392705, tzinfo=tzutc()), 'exponent': 0, 'until': datetime.datetime(2019, 4, 3, 6, 20, 48, 392693, tzinfo=tzutc())}
As we can see, the timezone seems to be UTC so the hour that is obtained is not the time of my time zone, it's two hours less. How can I fix this? Thank you and sorry for my english.