beyond-all-reason / teiserver

Middleware server for online gaming
https://www.beyondallreason.info/
MIT License
47 stars 47 forks source link

Saving a datetime such as `2024-04-21T14:16:48` sets it to `2024-04-21T00:00:00`, but `2024-04-21 14:16:48` keeps the time #276

Open StanczakDominik opened 3 months ago

StanczakDominik commented 3 months ago

Reproducer steps:

  1. Create a new action in http://localhost:4000/moderation/action/new_with_user?teiserver_user=%231_, any Reason, say 3d Expires, any restriction, a Note is fine.
  2. Open the edit page for the action you've created. Assuming it's action 1, that's http://localhost:4000/moderation/action/1/edit. You'll see something like 2024-04-20T04:52:58. in the Expires field
  3. Try to shorten it by a day, save, reopen the action. You'll see it went to 2024-04-19T00:00:00.
  4. Try to set it to 2024-04-20 04:52:58, with the T removed. It'll save fine and keep the time part.

So basically I guess if we edit datetime display to show in fields like the Expires field without the T in there, it'll be just fine :)