Commit 468593ab authored by Vasyl Bodnaruk's avatar Vasyl Bodnaruk

Fix bug with time PM

parent 54efae8a
......@@ -91,6 +91,8 @@ class NewJobCreateView(CreateView):
date = datetime.strptime(date[:-3], "%m/%d/%Y %H:%M")
if 'PM' in tp:
# TODO need make refactor, because here can be bug
if date.hour == 12:
return date
h = date.hour + 12 if date.hour < 12 else 0
return date.replace(hour=h)
return date
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment