home
Learn
screen_rotation
from zoneinfo import ZoneInfo from datetime import datetime dt = datetime.now(tz=ZoneInfo("Asia/Kolkata")) print(dt.strftime("%d-%m-%Y")) print(dt.strftime("%d/%m/%Y")) print(dt.strftime("%d-%b-%Y")) print(dt.strftime("%d-%B-%Y")) print(dt.strftime("%d %B,%Y")) print(dt.strftime("%H:%M:%S")) print(dt.strftime("%d-%m-%Y %H:%M:%S")) print(dt.strftime("%d-%m-%Y %H:%M:%S %Z"))
Program Output
20-10-2025 20/10/2025 20-Oct-2025 20-October-2025 20 October,2025 08:59:04 20-10-2025 08:59:04 20-10-2025 09:13:44 IST