FIX: CurrentUser now must be passed to resolveTimezone and user card local time issues (#9734)
* This is to prevent user's timezones being changed accidentally e.g. by admin looking at a user * This problem only occurred via the user card, however the user card was still calling userTimezone even if the setting to display user time in card was disabled
This commit is contained in:
@@ -114,7 +114,9 @@ QUnit.test(
|
||||
function(assert) {
|
||||
let dt = moment.tz(
|
||||
"2019-12-11T11:37:16",
|
||||
BookmarkController.currentUser.resolvedTimezone()
|
||||
BookmarkController.currentUser.resolvedTimezone(
|
||||
BookmarkController.currentUser
|
||||
)
|
||||
);
|
||||
|
||||
assert.equal(
|
||||
@@ -208,7 +210,9 @@ QUnit.test(
|
||||
moment
|
||||
.tz(
|
||||
"2028-12-12 08:00",
|
||||
BookmarkController.currentUser.resolvedTimezone()
|
||||
BookmarkController.currentUser.resolvedTimezone(
|
||||
BookmarkController.currentUser
|
||||
)
|
||||
)
|
||||
.toString(),
|
||||
"the custom date and time are parsed correctly with default time"
|
||||
|
||||
Reference in New Issue
Block a user