Add Rome time printing to Hello script
This commit is contained in:
5
Hello.py
5
Hello.py
@@ -1,8 +1,11 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
"""
|
"""
|
||||||
Created on Tue Nov 11 20:06:51 2025
|
Created on Tue Nov 11 20:06:51 2025
|
||||||
|
|
||||||
@author: Admin
|
@author: Admin
|
||||||
"""
|
"""
|
||||||
|
from datetime import datetime
|
||||||
|
from zoneinfo import ZoneInfo
|
||||||
|
|
||||||
print("Hello, world!")
|
print("Hello, world!")
|
||||||
|
rome_time = datetime.now(tz=ZoneInfo("Europe/Rome"))
|
||||||
|
print(f"Data e ora a Roma: {rome_time:%Y-%m-%d %H:%M:%S %Z}")
|
||||||
|
|||||||
Reference in New Issue
Block a user