I am new with python but I have passed sometime. I have played with datetime API. I have one requirement and definitely help will be some where but I am not able to find out. Actually I am converting UTC time to PST. It is working fine with me.
tz = timezone("US/Pacific")
utc_date_time = datetime.now(tz=pytz.utc)
opr_date = utc_date_time.astimezone(tz)
print(opr_date)
But I am not able to get GMT time and convert it into PST. Here are 2 questions
- How can I get GMT time
- How will it convert into PST
I am thankful in advance.