Getting users timezone on client side and passing it to server side within POST (on challenge complete), showing users stats with users timezone

After CR
This commit is contained in:
JelenaBarinova
2016-01-19 21:11:20 -05:00
parent e02d9d4039
commit 29f93df1bb
12 changed files with 179 additions and 109 deletions

View File

@@ -1,6 +1,7 @@
window.common = (function(global) {
const {
$,
moment,
ga = (() => {}),
common = { init: [] }
} = global;
@@ -51,7 +52,8 @@ window.common = (function(global) {
name: common.challengeName,
completedWith: didCompleteWith,
challengeType: common.challengeType,
solution
solution,
timezone: moment.tz.guess()
};
$.post('/completed-challenge/', data, function(res) {