diff --git a/plugins/discourse-local-dates/assets/javascripts/lib/local-date-builder.js.es6 b/plugins/discourse-local-dates/assets/javascripts/lib/local-date-builder.js.es6 index 3f81303cbf1..578bd7a330a 100644 --- a/plugins/discourse-local-dates/assets/javascripts/lib/local-date-builder.js.es6 +++ b/plugins/discourse-local-dates/assets/javascripts/lib/local-date-builder.js.es6 @@ -87,7 +87,7 @@ export default class LocalDateBuilder { ); previewedTimezones.push({ - timezone: this.localTimezone, + timezone: this._zoneWithoutPrefix(this.localTimezone), current: true, formated: this._createDateTimeRange(localDate, this.time) }); @@ -111,7 +111,7 @@ export default class LocalDateBuilder { } previewedTimezones.push({ - timezone, + timezone: this._zoneWithoutPrefix(timezone), formated: this._createDateTimeRange( localDate.datetimeWithZone(timezone), this.time @@ -121,7 +121,7 @@ export default class LocalDateBuilder { if (!previewedTimezones.length) { previewedTimezones.push({ - timezone: "Etc/UTC", + timezone: "UTC", formated: this._createDateTimeRange( localDate.datetimeWithZone("Etc/UTC"), this.time diff --git a/plugins/discourse-local-dates/test/javascripts/lib/local-date-builder-test.js.es6 b/plugins/discourse-local-dates/test/javascripts/lib/local-date-builder-test.js.es6 index 7895ca01cdf..a27d319eefc 100644 --- a/plugins/discourse-local-dates/test/javascripts/lib/local-date-builder-test.js.es6 +++ b/plugins/discourse-local-dates/test/javascripts/lib/local-date-builder-test.js.es6 @@ -309,7 +309,7 @@ QUnit.test("previews", assert => { { current: true, formated: "March 22, 2020 → March 23, 2020", - timezone: "Europe/Paris" + timezone: "Paris" } ] } @@ -324,11 +324,11 @@ QUnit.test("previews", assert => { { current: true, formated: "March 22, 2020 → March 23, 2020", - timezone: "Europe/Paris" + timezone: "Paris" }, { formated: "March 23, 2020 → March 23, 2020", - timezone: "Australia/Sydney" + timezone: "Sydney" } ] } @@ -343,7 +343,7 @@ QUnit.test("previews", assert => { { current: true, formated: "March 22, 2020 → March 23, 2020", - timezone: "Europe/Paris" + timezone: "Paris" } ] } @@ -358,7 +358,7 @@ QUnit.test("previews", assert => { { current: true, formated: "March 22, 2020 → March 23, 2020", - timezone: "Europe/Paris" + timezone: "Paris" } ] } @@ -373,7 +373,7 @@ QUnit.test("previews", assert => { { current: true, formated: "March 22, 2020 → March 23, 2020", - timezone: "Europe/Paris" + timezone: "Paris" } ] } @@ -388,7 +388,7 @@ QUnit.test("previews", assert => { { current: true, formated: "March 22, 2020 11:34 AM", - timezone: "Europe/Paris" + timezone: "Paris" } ] } @@ -403,15 +403,15 @@ QUnit.test("previews", assert => { { current: true, formated: "April 7, 2020 → April 8, 2020", - timezone: "Europe/Paris" + timezone: "Paris" }, { formated: "April 7, 2020 → April 7, 2020", - timezone: "Europe/London" + timezone: "London" }, { formated: "April 7, 2020 → April 7, 2020", - timezone: "Africa/Lagos" + timezone: "Lagos" } ] }