1
0
mirror of https://github.com/janeczku/calibre-web synced 2024-11-28 20:39:59 +00:00

Bugfix time and datetime.time

This commit is contained in:
Ozzie Isaacs 2022-05-01 10:35:00 +02:00
parent 858d099509
commit 7b45324149

View File

@ -25,7 +25,9 @@ import re
import base64 import base64
import json import json
import operator import operator
from datetime import datetime, timedelta, time import time
from datetime import datetime, timedelta
from datetime import time as datetime_time
from functools import wraps from functools import wraps
@ -205,7 +207,7 @@ def admin():
all_user = ub.session.query(ub.User).all() all_user = ub.session.query(ub.User).all()
email_settings = config.get_mail_settings() email_settings = config.get_mail_settings()
schedule_time = format_time(time(hour=config.schedule_start_time), format="short") schedule_time = format_time(datetime_time(hour=config.schedule_start_time), format="short")
t = timedelta(hours=config.schedule_duration // 60, minutes=config.schedule_duration % 60) t = timedelta(hours=config.schedule_duration // 60, minutes=config.schedule_duration % 60)
schedule_duration = format_timedelta(t, threshold=.99) schedule_duration = format_timedelta(t, threshold=.99)