
Here, in this post, we will see how can we Get Any Country Date And Time Using Python which will be something like a World clock using Python. For this, we need the datetime module and python’s timezone module i.e. pytz.
Before we proceed further, let’s see the video for more detailed and easy explanation–
To install pytz python, type the below command in your terminal–
pip install pytz
We can print the names of all countries whose timezone is available using this module using the following code–
Example
import pytz time_zones = pytz.all_timezones print(time_zones)
Output
['Africa/Abidjan', 'Africa/Accra', 'Africa/Addis_Ababa', 'Africa/Algiers',........ 'W-SU', 'WET', 'Zulu']
To print the date and time of any country, we need to use both modules i.e. datetime and pytz.
Here is the code to print the date and time of any country–
Example
from datetime import datetime
import pytz
country_time_zone = pytz.timezone('America/New_York')
country_time = datetime.now(country_time_zone)
print(country_time.strftime("Date is %d-%m-%y and time is %H:%M:%S"))
Output
Date is 23-09-20 and time is 00:39:26
In the similar way, we can print the date and time of any number of countries. To do this, we can create the list of desired countries for which we want to get current date and time and can use for loop to print all date and time of all the desired countries.
Now, let’s see the code to Get Any Country Date And Time Using Python–
from datetime import datetime
import pytz
# list of desired countries
Country_Zones = ['America/New_York', 'Asia/Kolkata', 'Australia/Sydney',
'Canada/Atlantic', 'Brazil/East','Chile/EasterIsland', 'Cuba', 'Egypt',
'Europe/Amsterdam', 'Europe/Athens', 'Europe/Berlin', 'Europe/Istanbul',
'Europe/Jersey', 'Europe/London', 'Europe/Moscow', 'Europe/Paris',
'Europe/Rome', 'Hongkong', 'Iceland', 'Indian/Maldives', 'Iran',
'Israel', 'Japan', 'NZ', 'US/Alaska', 'US/Arizona', 'US/Central',
'US/East-Indiana']
country_time_zones = []
for country_time_zone in Country_Zones:
country_time_zones.append(pytz.timezone(country_time_zone))
for i in range(len(country_time_zones)):
country_time = datetime.now(country_time_zones[i])
print(f"The date of {Country_Zones[i]} is {country_time.strftime('%d-%m-%y')} and The time of {Country_Zones[i]} is {country_time.strftime('%H:%M:%S')}")Output
The date of America/New_York is 23-09-20 and The time of America/New_York is 00:46:13 The date of Asia/Kolkata is 23-09-20 and The time of Asia/Kolkata is 10:16:13 The date of Australia/Sydney is 23-09-20 and The time of Australia/Sydney is 14:46:13 The date of Canada/Atlantic is 23-09-20 and The time of Canada/Atlantic is 01:46:13 The date of Brazil/East is 23-09-20 and The time of Brazil/East is 01:46:13 The date of Chile/EasterIsland is 22-09-20 and The time of Chile/EasterIsland is 23:46:13 The date of Cuba is 23-09-20 and The time of Cuba is 00:46:13 The date of Egypt is 23-09-20 and The time of Egypt is 06:46:13 The date of Europe/Amsterdam is 23-09-20 and The time of Europe/Amsterdam is 06:46:13 The date of Europe/Athens is 23-09-20 and The time of Europe/Athens is 07:46:13 The date of Europe/Berlin is 23-09-20 and The time of Europe/Berlin is 06:46:13 The date of Europe/Istanbul is 23-09-20 and The time of Europe/Istanbul is 07:46:13 The date of Europe/Jersey is 23-09-20 and The time of Europe/Jersey is 05:46:13 The date of Europe/London is 23-09-20 and The time of Europe/London is 05:46:13 The date of Europe/Moscow is 23-09-20 and The time of Europe/Moscow is 07:46:13 The date of Europe/Paris is 23-09-20 and The time of Europe/Paris is 06:46:13 The date of Europe/Rome is 23-09-20 and The time of Europe/Rome is 06:46:13 The date of Hongkong is 23-09-20 and The time of Hongkong is 12:46:13 The date of Iceland is 23-09-20 and The time of Iceland is 04:46:13 The date of Indian/Maldives is 23-09-20 and The time of Indian/Maldives is 09:46:13 The date of Iran is 23-09-20 and The time of Iran is 08:16:13 The date of Israel is 23-09-20 and The time of Israel is 07:46:13 The date of Japan is 23-09-20 and The time of Japan is 13:46:13 The date of NZ is 23-09-20 and The time of NZ is 16:46:13 The date of US/Alaska is 22-09-20 and The time of US/Alaska is 20:46:13 The date of US/Arizona is 22-09-20 and The time of US/Arizona is 21:46:13 The date of US/Central is 22-09-20 and The time of US/Central is 23:46:13 The date of US/East-Indiana is 23-09-20 and The time of US/East-Indiana is 00:46:13
Also read:
- You Can Now Run AI Fully Offline on Your Phone — Google’s Gemma 4 Just Changed Everything
- I Built a 24×7 AI Blogging System for WordPress Using Python (Free) — Full Code Inside
- This Reddit User “Hacked” AI With Simple Tricks… And The Results Are Insane
- One “rm -rf” Command Almost Wiped Out $100 Million Worth of Toy Story 2
- How to Make Money with ChatGPT in 2026: A Real Guide That Still Works
- PicoClaw vs OpenClaw: The Tiny AI That Could Replace Powerful AI Agents
- Oracle Layoffs 2026: People Woke Up to an Email… and Lost Their Jobs Instantly
- X’s New Video Update Is Breaking a Basic Feature — And Users Are Not Happy
- The Most Shocking Military Tech Yet: Robot Soldiers That Could Change Warfare Forever
- Sora Shutdown: The Reality Check That Shook AI Video — And What Comes Next
- Aya Expanse supports multiple languages for diverse global applications
- Alibaba releases Page Agent on GitHub for public access
- Google Sheets Gemini reaches new levels of performance and accuracy
- Artificial intelligence boosts cardiac care in rural Australian communities
- NVIDIA GTC 2026 Offers Insights into Future Artificial Intelligence Developments
- Google DeepMind Updates Satellite Embedding Dataset with 2025 Data
- Enhancing hierarchical instruction in advanced large language models
- Meta supports community development near its data centers through grants
- Exploring the world of underwater robotics through coding techniques
- ABB Robotics partners with NVIDIA for large scale physical AI solutions



