from datetime import datetime,timezone
t=datetime.now()
print(t)
print("---------")
#타임존
print(datetime.now(timezone.utc))
#1
print(datetime.now().strftime("%Y-%m-%d %H:%m:%S"))
#2
print(datetime.now().strftime("%Y-%M-%D %H:%M:%S %p %A %B"))
#3
print(datetime.now().strftime("%A, %B %d, %Y %H:%M:%S"))
print(datetime.now().strftime("%A,%B %d ,%Y %T"))
#4
print(datetime.now().strftime("%A, %B, %X %r"))
2024-07-09 12:15:51.117860
---------
2024-07-09 03:15:51.117860+00:00
2024-07-09 12:07:51
2024-15-07/09/24 12:15:51 PM Tuesday July
Tuesday, July 09, 2024 12:15:51
Tuesday,July 09 ,2024 12:15:51
Tuesday, July, 12:15:51 12:15:51 PM