msyavuz commented on code in PR #31310:
URL: https://github.com/apache/superset/pull/31310#discussion_r1891799963


##########
superset-frontend/src/components/TimezoneSelector/index.tsx:
##########
@@ -82,43 +70,40 @@ export default function TimezoneSelector({
       const getTimezoneName = (name: string) => {
         const offsets = getOffsetKey(name);
         return (
-          (currentDate.tz(name).isDST()
+          (isDST(currentDate.tz(name), name)
             ? offsetsToName[offsets]?.[1]
             : offsetsToName[offsets]?.[0]) || name
         );
       };
 
-      const ALL_ZONES = momentLib.tz
-        .countries()
-        .map(country => momentLib.tz.zonesForCountry(country, true))
-        .flat();
+      // TODO: remove this ts-ignore when typescript is upgraded to 5.1

Review Comment:
   `Intl.supportedValuesOf('timeZone')` is the recommended way to get a list of 
timezones and is available in javascript. Just not in typescript until 5.1



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to