From 0e37a800b5fda881bba0f4bbaae9c862a17f1890 Mon Sep 17 00:00:00 2001 From: Augusto Gunsch Date: Tue, 26 Apr 2022 11:02:39 -0300 Subject: [PATCH] Fix minutes rounding --- schedule.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/schedule.py b/schedule.py index a6cb315..5c3658e 100755 --- a/schedule.py +++ b/schedule.py @@ -10,7 +10,7 @@ EDITOR = os.environ.get('EDITOR', 'vim') os.makedirs('scheduled', exist_ok=True) tomorrow = datetime.utcnow() + timedelta(days=1) -tomorrow = tomorrow.replace(microsecond=0, second=0, minute=int(tomorrow.minute/15)) +tomorrow = tomorrow.replace(microsecond=0, second=0, minute=15*int(tomorrow.minute/15)) initial_msg = f'To: \nSubject: \nScheduled to (UTC): {tomorrow.isoformat()}\n---- Body ----' with tempfile.NamedTemporaryFile() as file: