diff --git a/apps/audits/views.py b/apps/audits/views.py index cc9755107..61fb1ff97 100644 --- a/apps/audits/views.py +++ b/apps/audits/views.py @@ -14,8 +14,9 @@ from .models import ProxyLog, CommandLog, LoginLog from .hands import User, Asset, SystemUser, AdminUserRequiredMixin -seven_days_ago_s = (datetime.datetime.now()-datetime.timedelta(7)).strftime('%m/%d/%Y') -now_s = datetime.datetime.now().strftime('%m/%d/%Y') +date_now = timezone.localtime(timezone.now()) +now_s = date_now.strftime('%m/%d/%Y') +seven_days_ago_s = (date_now-timezone.timedelta(7)).strftime('%m/%d/%Y') class ProxyLogListView(AdminUserRequiredMixin, ListView): @@ -53,6 +54,7 @@ class ProxyLogListView(AdminUserRequiredMixin, ListView): return self.queryset def get_context_data(self, **kwargs): + print(self.date_to_s) context = { 'app': _('Audits'), 'action': _('Proxy log list'), diff --git a/apps/users/templates/users/user_group_asset_permission.html b/apps/users/templates/users/user_group_asset_permission.html index e2458ffa4..d9edcdd35 100644 --- a/apps/users/templates/users/user_group_asset_permission.html +++ b/apps/users/templates/users/user_group_asset_permission.html @@ -23,7 +23,7 @@ {% trans 'Asset permission' %}