BadgerCode / tttdamagelogs

Damagelogs and RDM Manager for Trouble in Terrorist Town (a Garry's Mod gamemode)
GNU General Public License v3.0
20 stars 23 forks source link

Fixes #50 #77

Closed wgaylord closed 1 year ago

wgaylord commented 1 year ago

This fixes #50 while I have only tested this using the built in sqlite database. (sv.db) I am pretty sure it should work properly with external mysql databases as well.

Also as a suggestion that will also make the logs a bit easier to read. https://github.com/BadgerCode/tttdamagelogs/blob/master/lua/damagelogs/client/tabs/old_logs.lua#L234

Could we change the %I to %H so the time matches the on in the title bar above the list. Right now each entry in the list shows up using 12-hour time with no AM or PM. While the little title bar for that hour uses 24-hour time.

BadgerCode commented 1 year ago

Ah yeah good find!

I can see the list of days that have old logs is generated on startup https://github.com/BadgerCode/tttdamagelogs/blob/master/lua/damagelogs/server/oldlogs.lua#L136 (This could be simplified to SELECT DISTINCT year, month, day FROM damagelog_oldlogs_v3, but that's for another day 😛)

It makes sense to instead use the year,month,day that was found on startup, rather than converting it to a unix datetime.

BadgerCode commented 1 year ago

I think the second point you raised about the 24-hour time makes sense too. I'll look into it now

BadgerCode commented 1 year ago

image Yeah that makes more sense