Check TzExtra and its TzExtra.countries_time_zones/1 function (it depends on Tz). And GitHub - kimlai/tz_world: Resolve timezones from a location. ? Answer from mathieuprog on elixirforum.com
🌐
Wikipedia
en.wikipedia.org › wiki › List_of_tz_database_time_zones
List of tz database time zones - Wikipedia
2 weeks ago - This is a list of time zones from release 2026a of the tz database. Canonical – The primary, preferred zone name. Link – An alternative name (alias) which links to a canonical zone. Link† – A standard Link (as above). The dagger symbol (†) signifies that the zone was canonical in ...
🌐
Wikipedia
en.wikipedia.org › wiki › List_of_time_zones_by_country
List of time zones by country - Wikipedia
1 month ago - This is a list representing time zones by country. Countries are ranked by total number of time zones on their territory. Time zones of a country include that of dependent territories (except Antarctic claims). France, including its overseas territories, has the most time zones with 12 (13 ...
Discussions

Get timezone from country code / city
Hi all, I am doing a Stripe integration and I would like to send a scheduled email to the customer. It should be scheduled to a given time of the day, but in his timezone. I have a country code (ISO 3166-1 alpha-2) and a city of the customer. Those can be the inputs of a function. More on elixirforum.com
🌐 elixirforum.com
7
1
February 11, 2022
java - Is there any way to get TimeZone by only country name? - Stack Overflow
Hi I know this question is asked many times but those question relate webservice. I am developing an app that shows timezone selecting country by user. For example I have list of all the countries ... More on stackoverflow.com
🌐 stackoverflow.com
May 25, 2017
Get time zone(s) from abbreviation and country code
I have an abbreviation (e.g. "PST"), need to get timezone from that. Is that possible with moment-timezone? More on github.com
🌐 github.com
30
January 13, 2016
Getting timezone from address (country code, zip code and state)
laughs in Indiana More on reddit.com
🌐 r/golang
21
12
October 16, 2021
🌐
npm
npmjs.com › package › countries-and-timezones
countries-and-timezones - npm
April 18, 2025 - A timezone is defined by the following parameters: { name: 'Asia/Tel_Aviv', countries: [ 'IL' ], utcOffset: 120, utcOffsetStr: '+02:00', dstOffset: 180, dstOffsetStr: '+03:00', aliasOf: 'Asia/Jerusalem', deprecated: true } countries-db: Minimalistic lib with countries data. location-by-ip: Get the location of any IP address.
      » npm install countries-and-timezones
    
Published   Apr 18, 2025
Version   3.8.0
Author   Manuel de la Torre
🌐
Readthedocs
momentjscom.readthedocs.io › en › latest › moment-timezone › 01-using-timezones › 08-getting-country-zones
Getting Zones for country - momentjs.com - Read the Docs
moment.tz.zonesForCountry(String); // String[] moment.tz.zonesForCountry(String, Boolean); · To get a list of time zones for some country, use moment.tz.zonesForCountry()
🌐
PHP
php.net › manual › en › function.geoip-time-zone-by-country-and-region.php
PHP: geoip_time_zone_by_country_and_region - Manual
This will print the time zone for country JP (Japan), region 01 (Aichi). <?php $timezone = geoip_time_zone_by_country_and_region('JP', '01'); if ($timezone) { echo 'Time zone for JP/01 is: ' .
🌐
Timezone Converter
timezoneconverter.com › cgi-bin › zonehelp.tzc
Time Zones by Country
Time Zone Tools Time Zone Converter Time Zone Information Event Planning World Time What's My Time Zone? Time Zones by Country Forex Market Hours
🌐
TimeZoneDB
timezonedb.com › time-zones
List of Time Zones of the World - TimeZoneDB
Provides world time zone database download and API access.
Find elsewhere
🌐
GitHub
github.com › moment › moment-timezone › issues › 289
Get time zone(s) from abbreviation and country code · Issue #289 · moment/moment-timezone
January 13, 2016 - I have an abbreviation (e.g. "PST"), need to get timezone from that. Is that possible with moment-timezone?
Author   skolesnyk
🌐
GitHub
github.com › manuelmhtr › countries-and-timezones
GitHub - manuelmhtr/countries-and-timezones: Minimalistic library to work with countries and timezones data
The name of a primary timezone in case this is an alias. null means this is a primary timezone. ... { name: 'Asia/Tel_Aviv', countries: [ 'IL' ], utcOffset: 120, utcOffsetStr: '+02:00', dstOffset: 180, dstOffsetStr: '+03:00', aliasOf: 'Asia/Jerusalem', deprecated: true } countries-db: Minimalistic lib with countries data. location-by-ip: Get the location of any IP address.
Starred by 271 users
Forked by 72 users
Languages   TypeScript 98.3% | Shell 1.7% | TypeScript 98.3% | Shell 1.7%
🌐
Reddit
reddit.com › r/golang › getting timezone from address (country code, zip code and state)
r/golang on Reddit: Getting timezone from address (country code, zip code and state)
October 16, 2021 -

I have weird requirement of getting user's timezone using address data. In this use case I don't have access to client side, so I need to guess timezone purely using address info. I've googled a lot and found https://github.com/infused/ziptz this python library somewhat close to what I want albeit US only. Is there any similar library for got that can achieve something similar in golang?

🌐
Objects
helpdesk.objects.com.au › home › java
Can I find all available timezones for a country? | web development helpdesk
January 8, 2023 - The ICU4J package provides a method for returning the available timezones for a given country code. The following code will return a Map containing all available TimeZone's for each country, keyed on country code. [sourcecode lang="java"] public static Map getAvailableTimeZones() { Map ...
🌐
TimeZoneDB
timezonedb.com
Free Time Zone Database & API - TimeZoneDB
TimeZoneDB provides free time zone database for cities of the world. The database is licensed under Creative Commons Attribution 3.0 License. It contains countries name, time zones, abbreviation, GMT offset, and Daylight Saving Time (DST).
🌐
ToolV
toolv.com › home › apps › time zone list
Time Zone List - All World Timezones with UTC Offsets
2 weeks ago - Browse all world timezones with abbreviations, UTC offsets, DST status, and current local time. Filter by country, region, or offset.
Top answer
1 of 3
4

That functionality has been requested, and is pending in the following pull request:

https://github.com/moment/moment-timezone/pull/410

However, it would accept a country code (such as US), and would return a list of time zone identifiers, such as America/Los_Angeles. Note that the list you gave are not the values that would be returned.

Also keep in mind that one cannot assign a single offset to an entire time zone without considering point-in-time, so that would not be a part of the functionality either. See "time zone != offset" in the timezone tag wiki.

2 of 3
3

moment-timezone

MomentJS offers a moment-timezone package:

moment.tz.names(); would return an Array of all Timezones. These Timezones are prefixed with their respective continents; America/Detroit. You could easily filter this Array by Continent using plain JavaScript.

countries-and-timezones

To get a country/timezone matching you would definitely need another package like countries-and-timezones which offers a simple API to get Timezones by ISO country code:

countriesAndTimezones.getTimezonesForCountry('MX');

returns:

[ { name: 'America/Mexico_City',
    utcOffset: -360,
    offsetStr: '-06:00',
    countries: [ 'MX' ] },
  { name: 'America/Cancun',
    utcOffset: -300,
    offsetStr: '-05:00',
    countries: [ 'MX' ] },
  { name: 'America/Merida',
    utcOffset: -360,
    offsetStr: '-06:00',
    countries: [ 'MX' ] },
  { name: 'America/Monterrey',

...

Note, that there is an n x m relation between Countries and Timezones (hence a Timezone may live in multiple countries). Therefore this package also contains a getCountriesForTimezone() method.

🌐
Reddit
reddit.com › r/golang › easiest way to get county code from a time zone in go (and work with tz db in general)
r/golang on Reddit: Easiest way to get county code from a time zone in Go (and work with tz db in general)
February 23, 2024 -

What is the easiest way to get a country code from a time zone in Go? Which libraries could you recommend that parse TZ database, and allow you to do things like this easily?

Top answer
1 of 5
21
Most time zones cover multiple countries. What problem are you trying to solve here?
2 of 5
3
What are you trying to achieve? For timezones you will need the Olson/IANA timezone database. This will tell you about what the DST rules are for a specific timezone, what the offset from UTC or GMT is. If you want to parse the list of timezones and map them to a country you would need to look at the list of continent/region based timezone entries. Which would give you a way to convert some timezone/dst rules to a city, but not all, and there are also many aliases. Australia/NSW is an alias for Australia/Sydney. You'll run into problems with things that don't match such as UTC, GMT+4, CET, SAST, AEST, etc which are all valid time zone settings but have no single country associations, nor might they have DST rules. Timezones that cover multiple countries. Africa/Johannesburg for example covers three countries, all using SAST (South African Standard Time). Europe/Zagreb covers Croatia, but Europe/Belgrade is also correct for Croatia, and a few other countries as well. America/Puerto_Rico covers like 9 different Caribbean islands and more, all their own country, all using the same timezone name. You then also have to deal with things like the Americans that use PST, EST, etc. EST for example is valid for certain parts of Mexico, USA, and Canada. On linux machines you could crawl the zone data on disk generally found around /usr/lib/zoneinfo ? and convert ones you find there and map them to countries, which is fun because they're generally listed by City name. For country codes, i presume you are meaning the ISO3166 2 or 3 letter abbreviations. I don't know of any libraries that have that full list. You might be able to do something with the Maxmind GeoIP data (or similar). Another option would be to look at the Google map APIs, which i vaguely recall having timezone/country details. As for changing a list of timezones to countries, it's not that much different in size, definitely not an order of magnitude. Going from something like 352 (if you dereference the links) to ~216 You are far better off creating groupings of timezones and give them meaningful names for your internal use. ie South America, North America, Eastern Europe, Western Europe, Northern Europe, etc.