1

I need to get the local timezone offset in hours.

eg: 0530 is my UTC offset. How can I print this in python

>>>print (datetime.datetime.now()) 
>>>2017-04-20 10:33:49.272839

This is in my local time zone. Which is +0530 UTC. So I need to print (or get) +0530

Dhanushka Amarakoon
  • 3,502
  • 5
  • 31
  • 43

0 Answers0