diff options
-rw-r--r-- | system/api/analytics/init.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/system/api/analytics/init.go b/system/api/analytics/init.go index 95123ba..e118f89 100644 --- a/system/api/analytics/init.go +++ b/system/api/analytics/init.go @@ -114,7 +114,7 @@ func Week() (map[string]interface{}, error) { times := [7]time.Time{} dates := [7]string{} now := time.Now() - today := time.Date(now.Year(), now.Month(), now.Day(), 0, 0, 0, 0, time.Local) + today := time.Date(now.Year(), now.Month(), now.Day(), 0, 0, 0, 0, time.UTC) for i := range times { // subtract 24 * i hours to make days prior @@ -168,7 +168,7 @@ CHECK_REQUEST: for j := range times { // if on today, there will be no next iteration to set values for // day prior so all valid requests belong to today - if j == len(times) { + if j == len(times)-1 { if ts.After(times[j]) || ts.Equal(times[j]) { // do all record keeping total[j]++ |