Made timezone configurable

This commit is contained in:
root 2023-06-02 20:40:30 +02:00
parent 93ed8ec95b
commit fad54a6472
2 changed files with 2 additions and 2 deletions

View File

@ -2,3 +2,4 @@
title = A oder B
separator = oder
separator_char = ;
timezone = Europe/Berlin

View File

@ -16,7 +16,7 @@ config = ConfigParser()
config.read('config.ini')
logging.basicConfig(encoding='utf-8', level=logging.INFO, format='%(message)s')
logger = logging.getLogger('waitress')
tz = pytz.timezone('Europe/Berlin')
tz = pytz.timezone(config.get('main', 'timezone')
@app.after_request
def log_the_request(response):
@ -57,7 +57,6 @@ def log_the_request(response):
logfile = "{} - {} [{}] \"{} {}\" {} {} \"{}\" \"{}\"".format(log['remote_addr'], log['remote_user'], log['date'], log['method'], log['url'], log['status_code'], log['content_length'], log['referrer'], log['user_agent'])
logger.info(logfile)
return response
@app.route("/")