fix datetime utc for python<3.11
This commit is contained in:
parent
f8bd698848
commit
dc531de20a
1 changed files with 2 additions and 2 deletions
|
|
@ -1,4 +1,4 @@
|
||||||
from datetime import datetime
|
from datetime import datetime,timezone
|
||||||
from typing import TYPE_CHECKING, Optional
|
from typing import TYPE_CHECKING, Optional
|
||||||
from uuid import UUID, uuid4
|
from uuid import UUID, uuid4
|
||||||
|
|
||||||
|
|
@ -10,7 +10,7 @@ if TYPE_CHECKING:
|
||||||
|
|
||||||
|
|
||||||
def utc_now():
|
def utc_now():
|
||||||
return datetime.now(datetime.UTC)
|
return datetime.now(timezone.utc)
|
||||||
|
|
||||||
|
|
||||||
class VariableBase(SQLModel):
|
class VariableBase(SQLModel):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue