FIX: Local time not updating between user cards (#9564)

The local time was not updating between user cards because the computed property was not used correctly.

There's an old saying in Tennessee — I know it's in Texas, probably in Tennessee — that says, fool me once computed properties, shame on — shame on you. Fool me — you can't get fooled again.
This commit is contained in:
Martin Brennan
2020-04-28 13:23:43 +10:00
committed by GitHub
parent f9a44488e9
commit 66b5b8cf29
2 changed files with 27 additions and 3 deletions

View File

@@ -75,9 +75,8 @@ export default Component.extend(CardContentsBase, CanCheckEmails, CleansUp, {
return user.resolvedTimezone();
},
@discourseComputed()
formattedUserLocalTime() {
const timezone = this.userTimezone;
@discourseComputed("userTimezone")
formattedUserLocalTime(timezone) {
return moment.tz(timezone).format(I18n.t("dates.time_with_zone"));
},