Periodic jobs always are evaluated in UTC TZ

This commit is contained in:
Alex Dadgar
2016-04-12 09:47:25 -07:00
parent e263f91463
commit b63f3bb078
5 changed files with 11 additions and 7 deletions

View File

@@ -146,7 +146,7 @@ func (c *RunCommand) Run(args []string) int {
if detach || periodic {
c.Ui.Output("Job registration successful")
if periodic {
c.Ui.Output(fmt.Sprintf("Approximate next launch time: %v", job.Periodic.Next(time.Now())))
c.Ui.Output(fmt.Sprintf("Approximate next launch time: %v", job.Periodic.Next(time.Now().UTC())))
} else {
c.Ui.Output("Evaluation ID: " + evalID)
}

View File

@@ -155,7 +155,7 @@ func (c *StatusCommand) Run(args []string) int {
if periodic {
basic = append(basic, fmt.Sprintf("Next Periodic Launch|%v",
sJob.Periodic.Next(time.Now())))
sJob.Periodic.Next(time.Now().UTC())))
}
c.Ui.Output(formatKV(basic))