Merge pull request #267 from codingis4noobs2/master

Added A New Project (Get_Time_Timezones)
This commit is contained in:
Ayush Bhardwaj 2022-10-03 12:53:54 +05:30 committed by GitHub
commit 41aa3fc6e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 30 additions and 0 deletions

View File

@ -0,0 +1,10 @@
# How To Use:
First Install pytz Library, If You Have Already Installed It Then You Are Good To Go :)
Well For Those Who Haven't Installed It, Install It Using:
```python
pip install pytz
```
Now Simply Run The Program To Fetch Time From All Timezones :)

View File

@ -0,0 +1,18 @@
# First Install Using The Command Below:
# pip install pytz
from datetime import datetime
import pytz
# list of desired countries
Country_Zones = pytz.all_timezones # pytz.all_timezones will create a list with name of all timezones
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')}") #prints current time of all timezones in Country_Zones

View File

@ -0,0 +1 @@
pytz

View File

@ -45,6 +45,7 @@ So far, the following projects have been integrated to this repo:
|[Frammed text generator](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/FramedText) | [jcdwalle](https://github.com/jcdwalle)|
|[git_automation](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/git_automation)| [loge1998](https://github.com/loge1998)|
|[Gmail Mailing Script](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/mailing) |[mayank-kapur](https://github.com/kapurm17) |
|[Get Time By TimeZone](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/Get_Time_TimezoneWise)|[Parth Shah](https://github.com/codingis4noobs) |
|[Handwrting DNN recognizer](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/Handwriting_Recognizer) |[Chris]() |
|[HTML Table to List](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/HTML_Table_to_List) | [Nitish Srivastava](https://github.com/nitish-iiitd)|
|[Image circle formatter](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/Image-Circulator) |[Berk Gureken](https://github.com/bureken) |