Skip to content

Commit

Permalink
set local timezone to UTC on app boot
Browse files Browse the repository at this point in the history
  • Loading branch information
dannyvankooten committed Nov 14, 2018
1 parent b5ee8ea commit bdd0c5a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/cli/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package cli

import (
"os"
"time"

log "github.com/sirupsen/logrus"
"github.com/urfave/cli"
Expand All @@ -20,7 +21,7 @@ var app *App

func Run(v string) error {
// force all times in UTC, regardless of server timezone
os.Setenv("TZ", "")
time.Local = time.UTC

// setup CLI app
app = &App{cli.NewApp(), nil, nil}
Expand Down

0 comments on commit bdd0c5a

Please sign in to comment.