Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
37 lines (27 sloc) 828 Bytes
title signature
Getting Zones for country; // String[], { offset: true });

To get a list of time zones for some country, use'US');

By default this method returns zone names sorted alphabetically:

["America/Adak", "America/Anchorage", ... "Pacific/Honolulu"]

To get also offsets, pass { offset: true } as 2nd parameter:'CN', { offset: true });

it returns array of objects with name and offset:

   { name: "Asia/Shanghai", offset: -480 },
   { name: "Asia/Urumqi", offset: -360 }

It's useful if you need to sort time zones by offset.

All country codes can be retrieved using method

You can’t perform that action at this time.