# 날짜/시간:
---------------------------------------------------
from pytz import timezone
from datetime import datetime
seoul = timezone("Asia/Seoul")
now = datetime.now(seoul)
now.year
now.month
now.day
now.hour
now.minute
now.second
print("{}년 {}월 {}일 {}시 {}분 {}초".format(
now.year,
now.month,
now.day,
now.hour,
now.minute,
now.second
))
---------------------------------------------------
반응형