feat: Added date joined to user

This commit is contained in:
ITQ committed 2024-03-22 12:47:57 +03:00
1 parent 4cf40a465f
commit 4f3295a315
7 files changed
+41 -4

No files matched your search

+15
View File
@@ -0,0 +1,15 @@
__all__ = ("utcnow",)
from sqlalchemy.ext.compiler import compiles
from sqlalchemy.sql import expression
from sqlalchemy.types import DateTime
class utcnow(expression.FunctionElement): # noqa: N801
type = DateTime() # noqa: A003
inherit_cache = True
@compiles(utcnow, "postgresql")
def pg_utcnow(element, compiler, **kw):
return "TIMEZONE('utc', CURRENT_TIMESTAMP)"