You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is a bug in the display of the time in live graphs (that thankfully doesnt seem to appear when you go to “Download Report”), where the hour (time zone?) switches. It will show the time in the server's own timezone... and then at some point in the graph (depending on when you refreshed your browser to load the web UI), the time display will switch to the local timezone of your browser system.
Expected behavior
The time display should always be consistent. Either take the cue from the server (this is the default, and is fantastic)... or from the browser system.
Actual behavior
See "Describe the bug" section.
Here is a screenshot of the problem, showing how the hour switches from 11 (the server is GMT) to 19 (my system is GMT+8):
Steps to reproduce
Set up a server in a different time zone from your local system. Load the web UI and start a run. Refresh your browser, and click "Charts". You will notice that the last time as shown in the charts will always be in your local timezone, and as more points get added to the graphs, all of those will be in your local time.
This behaviour is repeatable. Refresh your browser again, click on "Charts" again... and you will see again that all of the time values will reset to the server's time zone save for the last one.
Environment
OS: Ubuntu 20.04
Python version: 3.8.10
Locust version: 1.6.0
The text was updated successfully, but these errors were encountered:
Locust uses server time to store the time of a task in stats history.
When fetching the initial stats history for the client (such on on page
refresh) it is written by the server using using this stored time.
While rendering a chart on the client, locust uses the localized client
time for the time the stats history was fetched. This would lead to a
jump in the x-axis time series when server and client time zones
differed.
Stats history (stats.py) now derives time from the time component of
the current datetime in UTC instead of server time zone.
This aligns it with other time stores used throughout locust
- particularly the start_time and end_time of reports - that make use
of time.time(), which is in UTC.
The client UI report (report.html) now localizes the server-rendered
times from history (formerly in server TZ, now in UTC).
This aligns it with the client-side report timekeeping of locust.js
updateStats() used for the x-axis of charts.
Issue: locustio#1835
Describe the bug
There is a bug in the display of the time in live graphs (that thankfully doesnt seem to appear when you go to “Download Report”), where the hour (time zone?) switches. It will show the time in the server's own timezone... and then at some point in the graph (depending on when you refreshed your browser to load the web UI), the time display will switch to the local timezone of your browser system.
Expected behavior
The time display should always be consistent. Either take the cue from the server (this is the default, and is fantastic)... or from the browser system.
Actual behavior
See "Describe the bug" section.
Here is a screenshot of the problem, showing how the hour switches from 11 (the server is GMT) to 19 (my system is GMT+8):
Steps to reproduce
Set up a server in a different time zone from your local system. Load the web UI and start a run. Refresh your browser, and click "Charts". You will notice that the last time as shown in the charts will always be in your local timezone, and as more points get added to the graphs, all of those will be in your local time.
This behaviour is repeatable. Refresh your browser again, click on "Charts" again... and you will see again that all of the time values will reset to the server's time zone save for the last one.
Environment
The text was updated successfully, but these errors were encountered: