diff options
author | diosmosis <diosmosis@users.noreply.github.com> | 2018-12-03 02:37:39 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-03 02:37:39 +0300 |
commit | 06536bb4612a664fbe999677ef3392b677e82b61 (patch) | |
tree | 91636d93738aad329a0c574eaf7cf1f3aa566ba8 /plugins/CoreHome/angularjs/common | |
parent | 30812c82f322310c9c6d5e93e929d3203133f4fd (diff) |
Add timezone to current date hours instead of directly setting to timezone offset. (#13787)
Diffstat (limited to 'plugins/CoreHome/angularjs/common')
-rw-r--r-- | plugins/CoreHome/angularjs/common/services/periods.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/CoreHome/angularjs/common/services/periods.js b/plugins/CoreHome/angularjs/common/services/periods.js index 10a5b3153a..3bc9861e79 100644 --- a/plugins/CoreHome/angularjs/common/services/periods.js +++ b/plugins/CoreHome/angularjs/common/services/periods.js @@ -346,7 +346,7 @@ date.setTime(date.getTime() + date.getTimezoneOffset() * 60 * 1000); // apply piwik site timezone (if it exists) - date.setHours((piwik.timezoneOffset || 0) / 3600); + date.setHours(date.getHours() + ((piwik.timezoneOffset || 0) / 3600)); // get rid of hours/minutes/seconds/etc. date.setHours(0); |