Commit Graph

7 Commits

Author SHA1 Message Date
Winkarst
0a587c9ccc Disable submit admin note button on switch to note (#33456)
Co-authored-by: Winkarst <74284083+Winkarst-cpu@users.noreply.github.co>
2024-11-23 17:41:28 +11:00
beck-thompson
dfda557d4b Note expiry time is now relative instead of using timestamps (#33262)
* Add the stuff

* Loc fix

* fixes

* Change
2024-11-15 10:24:27 +07:00
Pieter-Jan Briers
2e6eaa45c5 Fix admin notes and database time nonsense. (#25280)
God bloody christ. There's like three layers of shit here.

So firstly, apparently we were still using Npgsql.EnableLegacyTimestampBehavior. This means that time values (which are stored UTC in the database) were converted to local time when read out. This meant they were passed around as kind Local to clients (instead of UTC in the case of SQLite). That's easy enough to fix just turn off the flag and fix the couple spots we're passing a local DateTime ez.

Oh but it turns out there's a DIFFERENT problem with SQLite: See SQLite we definitely store the DateTimes as UTC, but when Microsoft.Data.Sqlite reads them it reads them as Kind Unspecified instead of Utc.

Why are these so bad? Because the admin notes system passes DateTime instances from EF Core straight to the rest of the game code. And that means it's a PAIN IN THE ASS to run the necessary conversions to fix the DateTime instances. GOD DAMNIT now I have to make a whole new set of "Record" entities so we avoid leaking the EF Core model entities. WAAAAAAA.

Fixes #19897
2024-02-20 10:13:31 +01:00
Repo
40e1286606 Fix to allow no severity on messages and watchlists (#19125) 2023-08-14 12:50:33 -07:00
DrSmugleaf
73158ec0f2 Require severity to be set when creating and editing notes (#19059) 2023-08-13 23:37:38 -04:00
Pieter-Jan Briers
b4b0fe41db Admin notes bugfixes (#18189) 2023-07-21 15:43:47 +02:00
Riggle
579913b617 Better notes and bans (#14228)
Co-authored-by: Chief-Engineer <119664036+Chief-Engineer@users.noreply.github.com>
2023-07-21 13:38:52 +02:00