From b82473ca64c27a7ef2e201c1e98bc41e58f2bfcd Mon Sep 17 00:00:00 2001 From: ellenaua Date: Thu, 20 Feb 2020 23:17:55 +0200 Subject: [PATCH] Order zones by name --- moment-timezone.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/moment-timezone.js b/moment-timezone.js index 69cb3a0d..f4f21bca 100644 --- a/moment-timezone.js +++ b/moment-timezone.js @@ -507,8 +507,9 @@ country = getCountry(country); if (country) { + var zones = country.zones.sort(); if (with_offset) { - return country.zones.map(function (zone_name) { + return zones.map(function (zone_name) { var zone = getZone(zone_name); return { name: zone_name, @@ -516,7 +517,7 @@ }; }); } else { - return country.zones; + return zones; } }