I am trying to convert UTC time to local timezone (Asia/Calcutta).
Here is what i did:
next_date_time
is a datetime
format, 2019-07-11 13:12:14.240000
tz = self._context.get('tz')
localtz = pytz.timezone(tz)
local_date = localtz.localize(next_date_time)
print'local_date',local_date
And the output is 2019-07-11 13:12:14.240000+05:30
. I can see the +5:30
here. But i need the output like
2019-07-11 18:42:14.240000
Is there any way to achieve this?