Skip to content

Commit

Permalink
feat: Adds timezone to argo cron list output (argoproj#7557) (argopro…
Browse files Browse the repository at this point in the history
…j#7559)

Signed-off-by: Bob Haddleton <[email protected]>
  • Loading branch information
bobh66 committed Jan 18, 2022
1 parent dbb1bcf commit eb1c3e0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/argo/commands/cron/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ func printTable(wfList []wfv1.CronWorkflow, listArgs *listFlags) {
if listArgs.allNamespaces {
_, _ = fmt.Fprint(w, "NAMESPACE\t")
}
_, _ = fmt.Fprint(w, "NAME\tAGE\tLAST RUN\tNEXT RUN\tSCHEDULE\tSUSPENDED")
_, _ = fmt.Fprint(w, "NAME\tAGE\tLAST RUN\tNEXT RUN\tSCHEDULE\tTIMEZONE\tSUSPENDED")
_, _ = fmt.Fprint(w, "\n")
for _, cwf := range wfList {
if listArgs.allNamespaces {
Expand All @@ -84,7 +84,7 @@ func printTable(wfList []wfv1.CronWorkflow, listArgs *listFlags) {
} else {
cleanNextScheduledTime = "N/A"
}
_, _ = fmt.Fprintf(w, "%s\t%s\t%s\t%s\t%s\t%t", cwf.ObjectMeta.Name, humanize.RelativeDurationShort(cwf.ObjectMeta.CreationTimestamp.Time, time.Now()), cleanLastScheduledTime, cleanNextScheduledTime, cwf.Spec.Schedule, cwf.Spec.Suspend)
_, _ = fmt.Fprintf(w, "%s\t%s\t%s\t%s\t%s\t%s\t%t", cwf.ObjectMeta.Name, humanize.RelativeDurationShort(cwf.ObjectMeta.CreationTimestamp.Time, time.Now()), cleanLastScheduledTime, cleanNextScheduledTime, cwf.Spec.Schedule, cwf.Spec.Timezone, cwf.Spec.Suspend)
_, _ = fmt.Fprintf(w, "\n")
}
_ = w.Flush()
Expand Down

0 comments on commit eb1c3e0

Please sign in to comment.