diff --git a/assets/js/components/DatePicker.js b/assets/js/components/DatePicker.js index 21b27f5..88c5ffd 100644 --- a/assets/js/components/DatePicker.js +++ b/assets/js/components/DatePicker.js @@ -38,11 +38,11 @@ class DatePicker extends Component { @bind setTimeRange(period) { let beforeDate = new Date(); - beforeDate.setUTCHours(24); + beforeDate.setHours(24); beforeDate.setMinutes(0); let afterDate = new Date(); - afterDate.setUTCHours(0); + afterDate.setHours(0); afterDate.setMinutes(0); switch(period) { case "week": diff --git a/cmd/fathom/main.go b/cmd/fathom/main.go index f5c1135..960a79a 100644 --- a/cmd/fathom/main.go +++ b/cmd/fathom/main.go @@ -18,6 +18,10 @@ type App struct { var app *App func main() { + // force all times in UTC, regardless of server timezone + os.Setenv("TZ", "") + + // setup CLI app app = &App{cli.NewApp(), nil, nil} app.Name = "Fathom" app.Usage = "simple & transparent website analytics" @@ -70,7 +74,6 @@ func main() { func before(c *cli.Context) error { app.config = config.Parse(c.String("config")) app.database = datastore.New(app.config.Database) - return nil }