diff options
author | Alban Gruin | 2018-01-28 11:26:56 +0100 |
---|---|---|
committer | Alban Gruin | 2018-01-28 11:26:56 +0100 |
commit | 37d80d84d8ce6cb0a17a0e4179e4c7a453f7fcc2 (patch) | |
tree | 45546e02fab73d199a91d18b312b7914f4032112 /management/commands | |
parent | aab8372b27c27becbdf875d6c30fa49ea218abf4 (diff) |
Remplacement de l’arithmétique de date et heure par datetime.combine()
Diffstat (limited to 'management/commands')
-rw-r--r-- | management/commands/_private.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/management/commands/_private.py b/management/commands/_private.py index 0f87179..4e35990 100644 --- a/management/commands/_private.py +++ b/management/commands/_private.py @@ -28,8 +28,7 @@ import edt def add_time(date, time): ptime = datetime.datetime.strptime(time, "%H:%M") - delta = datetime.timedelta(hours=ptime.hour, minutes=ptime.minute) - return date + delta + return datetime.datetime.combine(date, ptime) def delete_courses_in_week(source, year, week, today): |