From abb1e07f3f2108202b9e3f1c6c9cf827d0bca798 Mon Sep 17 00:00:00 2001 From: nero Date: Tue, 7 Nov 2023 16:45:02 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20cr=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/bk-user/bkuser/apps/tenant/models.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/bk-user/bkuser/apps/tenant/models.py b/src/bk-user/bkuser/apps/tenant/models.py index b708a3999..6102f38a5 100644 --- a/src/bk-user/bkuser/apps/tenant/models.py +++ b/src/bk-user/bkuser/apps/tenant/models.py @@ -10,7 +10,6 @@ """ from django.conf import settings from django.db import models -from django.utils import timezone from bkuser.apps.data_source.models import DataSource, DataSourceDepartment, DataSourceUser from bkuser.apps.tenant.constants import TenantFeatureFlag, UserFieldDataType @@ -81,8 +80,7 @@ class Meta: @property def account_expired_at_display(self) -> str: - local_time = timezone.localtime(self.account_expired_at) - return local_time.strftime("%Y-%m-%d %H:%M:%S") + return self.account_expired_at.strftime("%Y-%m-%d") class TenantDepartment(TimestampedModel):