Fixed registered field having wrong timezone

This happened with at least Postgres, which took it's server's timezone. It's complicated. Let's just set it from our side instead where we have some control.
This commit is contained in:
Donkie
2023-10-02 21:36:44 +02:00
parent 205574fa2c
commit 9595aec675
6 changed files with 21 additions and 0 deletions

View File

@@ -2,6 +2,7 @@
import logging
from collections.abc import Sequence
from datetime import datetime
from typing import Optional, Union
from sqlalchemy import func, select
@@ -44,6 +45,7 @@ async def create(
db_item = models.Filament(
name=name,
registered=datetime.utcnow().replace(microsecond=0),
vendor=vendor_item,
material=material,
price=price,