Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

uwsgi-sloth latest_5mins.html fails when timezone uwsgi does not match timezone of user running uwsgi-sloth #11

Open
harmv opened this issue Feb 28, 2019 · 1 comment

Comments

@harmv
Copy link

harmv commented Feb 28, 2019

My uwsgi logging is in utc, the users typically have timezone 'Europe/Amsterdam'.

running uwsgi-sloth start gives:

(v) harm@server:~/uwsgi-sloth$ uwsgi-sloth start -c myconf.conf 
[2019-02-28 11:38:14,005] uwsgi_sloth INFO: Start from last savepoint, last_log_datetime: 2019-02-28 11:33:14.005028
[2019-02-28 11:38:20,828] uwsgi_sloth INFO: Rendering HTML file /home/harm/uwsgi-sloth/html/html/latest_5mins.html...

As the uwsgi logging timestamps are in UTC (eg: "Thu Feb 28 10:40:00 2019") uwsgi-sloth does do the lookup for the last 5 minutes correctly.

Result

latest_5mins.html is always empty ( Slow / Total requests == 0 / 0 )

Expeced Result

latest_5mins.html shows the last 5 minutes.

html output should use the timezone of the user.
The parsing of the uwsgi logging should be able to deal with the timezone difference between report and uwsgi logging.

@harmv
Copy link
Author

harmv commented Feb 28, 2019

Note workaround as mentioned in #9 does work, if I set export TZ=Europe/Amsterdam before running uwsgi-sloth start, then I do get output in latest_5mins.html.

But then the rendered html files show incorrect (utc) timstamps. I'd expect the html to render in the timezone as the users runs in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant