Hello. I think I've lost my mind trying to figure this out so I'm asking for help.
I have a FormSet of ModelForms where the model has a DateTime field. When I save the Form the model doesn't shift the timezone the correct amount, but then loading it it does so saving multiple times in a row continuously shifts the time. For example
The form input value is "2024-10-12 12:34:00" (I have verified this is unchanged in the line before the formset's .save())
This saves into the database as "2024-10-12 02:29:00" which is 10 hours and 5 minutes different. Not a valid timezone difference.
This then loads back into the form as "2024-10-12 13:29:00" which is the correct 11 hours different from the database value, but is not the same value as was saved.
In Django settings.py I have USE_TZ=True and my localtime is Australia/Sydney which is +10 or +11 depending on daylight savings.
MariaDB has timezone set to UTC.
Clearly this would be a massive issue if it was a problem with Django itself so it's probably something I'm doing wrong but how do I figure out what?
Thanks.