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

WebLogs should use localtime() instead of gmtime() #293

Open
ghost opened this issue Dec 20, 2015 · 7 comments
Open

WebLogs should use localtime() instead of gmtime() #293

ghost opened this issue Dec 20, 2015 · 7 comments

Comments

@ghost
Copy link

ghost commented Dec 20, 2015

in order to display proper time i adjusted plugins/WebLogs line 178 from
gmtime = time.gmtime(int(words[0]))
to
gmtime = time.localtime(int(words[0]))

The server is running in TZ Germany/Berlin and hence showing always "wrong" time.
Subsequently var naming in some following lines should be adjusted to.

@progval
Copy link
Owner

progval commented Dec 20, 2015

I know using UTC is not the best solution, but I am not sure using the server time is much better. It is still using an arbitrary timezone independent from the user.

@ghost
Copy link
Author

ghost commented Dec 20, 2015

True. But it'll helps a lot of channels, as usually the non english language in a channel predefines most of users TZ too. GMT is valid just for one TZ

@ghost
Copy link
Author

ghost commented Dec 20, 2015

well, i'm going to make this configurable

@progval
Copy link
Owner

progval commented Dec 20, 2015

Yeah, I just had the same idea.

@ghost
Copy link
Author

ghost commented Dec 20, 2015

so you are faster 8)

@progval
Copy link
Owner

progval commented Dec 20, 2015

You can try something based on this to do the conversion: https://github.com/ProgVal/Limnoria/blob/master/plugins/Time/plugin.py#L193-L206

@ghost
Copy link
Author

ghost commented Dec 20, 2015

OK. Will try. Nice job for a beginner like me. Might take some time.

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