Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Dimitri Podborski
AutomationTools
Commits
49525522
Commit
49525522
authored
Apr 19, 2021
by
Dimitri Podborski
Browse files
Systems deadline is the end of Monday (CEST)
parent
ea5ec42a
Changes
1
Hide whitespace changes
Inline
Side-by-side
automation/helpers.py
View file @
49525522
...
@@ -103,7 +103,7 @@ def is_document_late(meeting_start, v1_upload_timestamp):
...
@@ -103,7 +103,7 @@ def is_document_late(meeting_start, v1_upload_timestamp):
meeting_start and v1_upload_timestamp shall be datetime objects
meeting_start and v1_upload_timestamp shall be datetime objects
'''
'''
meeting_start
=
meeting_start
.
replace
(
hour
=
0
,
minute
=
0
,
second
=
0
)
# paranoia
meeting_start
=
meeting_start
.
replace
(
hour
=
0
,
minute
=
0
,
second
=
0
)
# paranoia
deadline
=
meeting_start
-
timedelta
(
days
=
7
)
# End of
Su
nday
deadline
=
meeting_start
-
timedelta
(
days
=
6
)
# End of
Mo
nday
diff
=
deadline
-
v1_upload_timestamp
diff
=
deadline
-
v1_upload_timestamp
if
diff
.
total_seconds
()
<=
0
:
if
diff
.
total_seconds
()
<=
0
:
return
True
return
True
...
@@ -113,7 +113,7 @@ def try_parsing_date(text):
...
@@ -113,7 +113,7 @@ def try_parsing_date(text):
'''
'''
Try parsing the timestamp, if not possible return None
Try parsing the timestamp, if not possible return None
'''
'''
for
fmt
in
(
'%Y-%m-%d %H:%M:%S'
,
'Y-%m-%d'
):
for
fmt
in
(
'%Y-%m-%d %H:%M:%S'
,
'
%
Y-%m-%d'
):
try
:
try
:
return
datetime
.
strptime
(
text
.
strip
(),
fmt
)
return
datetime
.
strptime
(
text
.
strip
(),
fmt
)
except
ValueError
:
except
ValueError
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment