From ea4ea9d6b67cdf11f335499e4c7e33a3928fedbd Mon Sep 17 00:00:00 2001 From: simontigers <47096077+simontigers@users.noreply.github.com> Date: Mon, 16 Dec 2024 13:58:20 +0800 Subject: [PATCH] fix: acl user date_joined timezone --- cmdb-api/api/models/acl.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmdb-api/api/models/acl.py b/cmdb-api/api/models/acl.py index 730a0128..61162b0e 100644 --- a/cmdb-api/api/models/acl.py +++ b/cmdb-api/api/models/acl.py @@ -105,8 +105,8 @@ class User(CRUDModel, SoftDeleteMixin): _password = db.Column("password", db.String(80)) key = db.Column(db.String(32), nullable=False) secret = db.Column(db.String(32), nullable=False) - date_joined = db.Column(db.DateTime, default=datetime.utcnow) - last_login = db.Column(db.DateTime, default=datetime.utcnow) + date_joined = db.Column(db.DateTime, default=datetime.now) + last_login = db.Column(db.DateTime, default=datetime.now) block = db.Column(db.Boolean, default=False) has_logined = db.Column(db.Boolean, default=False) wx_id = db.Column(db.String(32))