FIX: dav_submission: timezone parsing error with CEST
All checks were successful
buildbot/tox Build done.
All checks were successful
buildbot/tox Build done.
The timezone within metadata.txt will now be written as Europe/Berlin instead of CET or CEST, because pytz does not recognize CEST and thus will raise an UnknownTimezoneError.
This commit is contained in:
@@ -63,7 +63,7 @@ class ListView(generic.ListView):
|
||||
if mo is not None:
|
||||
metadata['group'] = mo.group(1)
|
||||
continue
|
||||
mo = re.match(r'^Datum: ([0-9]{2}.[0-9]{2}.[0-9]{4}) ([0-9]{2}:[0-9]{2}:[0-9]{2}) (.*)$', line)
|
||||
mo = re.match(r'^Datum: ([0-9]{2}.[0-9]{2}.[0-9]{4}) ([0-9]{2}:[0-9]{2}:[0-9]{2})[\s]*(.*)$', line)
|
||||
if mo is not None:
|
||||
date_str = mo.group(1)
|
||||
time_str = mo.group(2)
|
||||
@@ -226,7 +226,7 @@ Beschreibung:
|
||||
"""
|
||||
metadata_format_kwargs = {
|
||||
'date': timezone.localtime(now).strftime('%d.%m.%Y'),
|
||||
'time': timezone.localtime(now).strftime('%H:%M:%S %Z'),
|
||||
'time': timezone.localtime(now).strftime('%H:%M:%S') + ' ' + timezone.get_current_timezone_name(),
|
||||
'name': form.cleaned_data['name'],
|
||||
'email_address': form.cleaned_data['email_address'],
|
||||
'group': form.cleaned_data['group'],
|
||||
|
||||
Reference in New Issue
Block a user