summaryrefslogtreecommitdiffstats
path: root/bin/reproducible_remote_scheduler.py
diff options
context:
space:
mode:
authorMattia Rizzolo <mattia@mapreri.org>2015-06-12 19:17:56 +0200
committerHolger Levsen <holger@layer-acht.org>2015-06-12 20:02:13 +0200
commitfe9b6335b4876cb8f02a306199ed13e787e2b1f4 (patch)
tree4ecb1b2d9f46bf24e0ccb781b1e4f45831ce6a50 /bin/reproducible_remote_scheduler.py
parentb7198e0e12e5a3a89932f74752640c817cbdf923 (diff)
downloadjenkins.debian.net-fe9b6335b4876cb8f02a306199ed13e787e2b1f4.tar.xz
reproducible: *.py: from datetime import datetime, timedelta instead of all datetime
Diffstat (limited to 'bin/reproducible_remote_scheduler.py')
-rwxr-xr-xbin/reproducible_remote_scheduler.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/reproducible_remote_scheduler.py b/bin/reproducible_remote_scheduler.py
index aeca6f0b..55b76636 100755
--- a/bin/reproducible_remote_scheduler.py
+++ b/bin/reproducible_remote_scheduler.py
@@ -119,11 +119,11 @@ message += ': ' + ' '.join(pkgs)[0:256] + blablabla + artifacts_txt
# schedule on the full hour so we can recognize them easily
epoch = int(time.time())
yesterday = epoch - 60*60*24
-now = datetime.datetime.now()
+now = datetime.now()
days = int(now.strftime('%j'))*2
hours = int(now.strftime('%H'))*2
minutes = int(now.strftime('%M'))
-time_delta = datetime.timedelta(days=days, hours=hours, minutes=minutes)
+time_delta = timedelta(days=days, hours=hours, minutes=minutes)
date = (now - time_delta).strftime('%Y-%m-%d %H:%M')
log.debug('date_scheduled = ' + date + ' time_delta = ' + str(time_delta))