Python novice, REAL Python novice
How do I add “CST” or “CDT” (US central time) to make the result:
---Time is: Sat Feb-06-21 @ 07:25:14 AM CST
There doesn’t seem to be formatting code for this
from datetime import datetime
import pytz
# get the standard UTC time
UTC = pytz.utc
# get the time zone of the specified location
IST = pytz.timezone('America/Chicago')
#print the date and time in specified format
datetime_ist = datetime.now(IST)
print("Time is:",datetime_ist.strftime('%a %b-%d-%y @ %I:%M:%S %p'))
THANKS