From 4f91f2bcd311446288feb8a166c763d11e6f38ce Mon Sep 17 00:00:00 2001 From: Alex Dadgar Date: Fri, 7 Jul 2017 16:18:12 -0700 Subject: [PATCH] When restoring periodic jobs, take into consideration launch time zone Fixes https://github.com/hashicorp/nomad/issues/2721 --- nomad/leader.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nomad/leader.go b/nomad/leader.go index 7b80dded3f35..3c308a7863e4 100644 --- a/nomad/leader.go +++ b/nomad/leader.go @@ -299,7 +299,7 @@ func (s *Server) restorePeriodicDispatcher() error { } // nextLaunch is the next launch that should occur. - nextLaunch := job.Periodic.Next(launch.Launch) + nextLaunch := job.Periodic.Next(launch.Launch.In(job.Periodic.GetLocation())) // We skip force launching the job if there should be no next launch // (the zero case) or if the next launch time is in the future. If it is