Morphyum / PersistentMap

Server for the persistent war map
GNU General Public License v3.0
2 stars 1 forks source link

UserQuotaInterceptor printing strings incorrectly #19

Closed IceRaptor closed 5 years ago

IceRaptor commented 5 years ago

UQI is calling ToString() on the DateNow objects, which print in a weird fashion:

2018-10-29 23:24:19.8617|UserQuotaInterceptor.Intercept|IP: Flooding from IP:(0AA20288F23...) - last request was 29.10.2018 22:17:06 which was 13s ago.

Need to pass a formatter to be consistent.

IceRaptor commented 5 years ago

Correction; the timestamp printed by NLog is logging in server-relative time (UTC+1), while the DateNow object is printing in UTC+0. The DateNow object is printing a locale-sensitive string though, which accounts for the odd behavior.

Finally, the delta is only printing the seconds, not the minutes + seconds. This needs changed as wel.

IceRaptor commented 5 years ago

Fixed, and deployed.