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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user