mirror of https://github.com/status-im/fathom.git
use local timezone in client, utc timezone on server. should close #31
This commit is contained in:
parent
fc552b0508
commit
0caf52b780
|
@ -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":
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue