progval / Supybot-plugins

Collection of plugins for Supybot/Limnoria I wrote or forked.
https://github.com/ProgVal/Limnoria/
108 stars 63 forks source link

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

Open ghost opened 8 years ago

ghost commented 8 years ago

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 commented 8 years ago

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 commented 8 years ago

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 commented 8 years ago

well, i'm going to make this configurable

progval commented 8 years ago

Yeah, I just had the same idea.

ghost commented 8 years ago

so you are faster 8)

progval commented 8 years ago

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 commented 8 years ago

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