Thor77 / TeamspeakStats

A simple Teamspeak stats-generator - based on server-logs
MIT License
19 stars 2 forks source link

Switch to Pendulum for datetime and timestamp handling #22

Closed Thor77 closed 7 years ago

Thor77 commented 7 years ago

Pendulum provides a more convenient replacement for datetime. Using it would eliminate the tz_aware_timestamp-hack and implementing the UTC-timezone for Python 2 compatibility.

Drawback: ~0,5 seconds slower than the old implementation (at least for big log collections).

Thor77 commented 7 years ago

Additionally last seen time is shown relative with this PR:

current

before

PR

after

djmattyg007 commented 7 years ago

Would it be possible to have a choice between relative and absolute times?

Thor77 commented 7 years ago

Would it be possible to have a choice between relative and absolute times?

Yeah, definitely. Thanks for the suggestion, will implement that!

Thor77 commented 7 years ago

Done. @djmattyg007 What do you think is a good default for this? Keep it at absolute until the next major release to avoid unexpected behaviour?

Thor77 commented 7 years ago

Merged as 65a83792615d6aafdd1f26494e0d083b028741fd and edff1e956d6255d28b1709227d436a30ea2c6755