I am using python-rrdtool to generate graphs from rrd files, it is by default generating graphs in CST time zone. How can i change the default time zone to UTC.
I found that setting the TZ env variable can do the trick. How can i do this using python-rrdtool ?
I followed this tutorial to create graphs using python-rrdtool
Thank You
Never mind, I found the solution,
To set the TZ variable using python, you need to add the below lines to your python script where you are generating your rrd graphs -
import time, os
os.environ['TZ'] = "Asia/Kolkata" # timezone you want to display graphs in
time.tzset()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With