MKP 0.2.1, calculation of create/modify time for domains corrected

This commit is contained in:
Ralf Mellis 2023-08-26 15:19:23 +02:00
parent 4edb6adccd
commit 6dd87d171c
2 changed files with 10 additions and 8 deletions

View File

@ -95,18 +95,20 @@ def parse_mailcow_domains_section(string_table):
if create_time_value == "None":
create_time_data = "Not available"
else:
create_time = int(create_time_value)
curr_time = int(time.time())
diff_time = curr_time - create_time
create_time_data = render.timespan(diff_time)
create_time_data = create_time_value
#create_time = int(create_time_value)
#curr_time = int(time.time())
#diff_time = curr_time - create_time
#create_time_data = render.timespan(diff_time)
modify_time_value = line[3]
if modify_time_value == "None":
modify_time_data = "Never"
else:
modify_time = int(modify_time_value)
curr_time = int(time.time())
diff_time = curr_time - modify_time
modify_time_data = render.timespan(diff_time)
modify_time_data = modify_time_value
#modify_time = int(modify_time_value)
#curr_time = int(time.time())
#diff_time = curr_time - modify_time
#modify_time_data = render.timespan(diff_time)
# calculate percentage of used mailboxes
max_number_of_mailboxes = int(line[4])
number_of_mailboxes = int(line[5])

BIN
mkp/Mailcow-0.2.1.mkp Executable file

Binary file not shown.