UX: display zones without prefix to reduce noise (#9383)

UX: display zones without prefix to reduce noise (#9383)

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 3f81303..578bd7a 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 7895ca0..a27d319 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"
           }
         ]
       }

GitHub sha: 66d375cb

This commit appears in #9383 which was merged by jjaffeux.