Change/Align Log.html Timezone to tested environment

I have jenkins slave that running tests on robot container that is running tests on remote test environment
I want the logs (log.html) timezone to be as the tested environment timezone
Actually it will show the timezone that the PC you are opening the log.html page has
My question is if it is possible to align the log.html timezone to my tested environment?


Question about your setup, as you’re mentioning a container I assume you’re using Docker. Did you set a “ENV TZ” variable in your Dockerfile ?

You could control the time zone with this, or even pass it as argument for the run command :

docker run -e TZ="area" your-robot-image

If the final environment can have different timezones, maybe it’s possible to set it dynamically with OperatingSystem library and something like Set Environment Variable, but not sure about this.



I have tried this and set an Environment variable for specific timezone
but log.html is not affected by this, I mean If i open the log.html locally it will set the timezone of my local environment
So looking for workaround or any idea how can I control this log.html and set a constant timezone

If im not mistaken, there is no timezone specified in neither in the output.xml or the html files. And for both, the timestamp is from the machine where your robot/python is running. See;

As a hack, replacing timestamp in the html file after robot has created those shouldn’t be a huge effort with some python or what ever scripting language you prefer if you know the TZ difference of your remote test environment and your local machine.