From 71ff384c7f4f56df963b2171d899d4c29003beca Mon Sep 17 00:00:00 2001 From: tianqiaoxiangzhe <1161824577@qq.com> Date: Fri, 18 Nov 2016 16:41:45 +0800 Subject: [PATCH] fix schedule caluclate next time the schedule can not run on the caluclated next time use 'datetime.now' , because my time zone is several hours higher than utc --- Duplicati/Server/Scheduler.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Duplicati/Server/Scheduler.cs b/Duplicati/Server/Scheduler.cs index 9871ff34f..9565db50f 100644 --- a/Duplicati/Server/Scheduler.cs +++ b/Duplicati/Server/Scheduler.cs @@ -274,7 +274,7 @@ namespace Duplicati.Server //Caluclate next time, by finding the first entry later than now try { - start = GetNextValidTime(start, new DateTime(Math.Max(DateTime.Now.AddSeconds(1).Ticks, start.AddSeconds(1).Ticks), DateTimeKind.Utc), sc.Repeat, sc.AllowedDays); + start = GetNextValidTime(start, new DateTime(Math.Max(DateTime.UtcNow.AddSeconds(1).Ticks, start.AddSeconds(1).Ticks), DateTimeKind.Utc), sc.Repeat, sc.AllowedDays); } catch(Exception ex) {