From 37d80d84d8ce6cb0a17a0e4179e4c7a453f7fcc2 Mon Sep 17 00:00:00 2001 From: Alban Gruin Date: Sun, 28 Jan 2018 11:26:56 +0100 Subject: Remplacement de l’arithmétique de date et heure par datetime.combine() --- management/commands/_private.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'management/commands') 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): -- cgit v1.2.1