8
8
from TM1py .Services .RestService import RestService
9
9
from TM1py .Utils import verify_version , deprecated_in_version , odata_track_changes_header , require_data_admin , \
10
10
format_url , \
11
- require_version , require_ops_admin
11
+ require_version , require_ops_admin , utc_localize_time
12
12
from TM1py .Services .ConfigurationService import ConfigurationService
13
13
14
14
@@ -74,13 +74,13 @@ def get_entries(self, user: str = None, object_type: str = None, object_name: st
74
74
if since :
75
75
# If since doesn't have tz information, UTC is assumed
76
76
if not since .tzinfo :
77
- since = self . utc_localize_time (since )
77
+ since = utc_localize_time (since )
78
78
log_filters .append (format_url (
79
79
"TimeStamp ge {}" , since .strftime ("%Y-%m-%dT%H:%M:%SZ" )))
80
80
if until :
81
81
# If until doesn't have tz information, UTC is assumed
82
82
if not until .tzinfo :
83
- until = self . utc_localize_time (until )
83
+ until = utc_localize_time (until )
84
84
log_filters .append (format_url (
85
85
"TimeStamp le {}" , until .strftime ("%Y-%m-%dT%H:%M:%SZ" )))
86
86
url += "&$filter={}" .format (" and " .join (log_filters ))
@@ -93,4 +93,4 @@ def get_entries(self, user: str = None, object_type: str = None, object_name: st
93
93
@require_ops_admin
94
94
def activate (self ):
95
95
config = {'Administration' : {'AuditLog' : {'Enable' : True }}}
96
- self .configuration .update_static (config )
96
+ self .configuration .update_static (config )
0 commit comments