from datetime import datetime
from pytz import timezone
d1 = datetime.now(tz = timezone('Asia/Calcutta'))
d2 = datetime(2019,12,12,12,12,12,12)
zone = timezone('Asia/Calcutta')
d2 = zone.localize(d2)
d3 = datetime(2019,12,12,12,12,12,12,tzinfo = timezone('Asia/Calcutta'))
print(d1,d1.tzinfo.tzname)
print(d2,d2.tzinfo.tzname)
print(d3,d3.tzinfo.tzname)
This is the output i got
2021-07-03 14:00:03.135000+05:30 <bound method DstTzInfo.tzname of <DstTzInfo 'Asia/Calcutta' IST+5:30:00 STD>>
2019-12-12 12:12:12.000012+05:30 <bound method DstTzInfo.tzname of <DstTzInfo 'Asia/Calcutta' IST+5:30:00 STD>>
2019-12-12 12:12:12.000012+05:53 <bound method DstTzInfo.tzname of <DstTzInfo 'Asia/Calcutta' LMT+5:53:00 STD>>
Just look at the timezones ,as you can see from the output whenever i try to pass timezone with tzinfo as i did in the last d3 object it gives me LMT+5:53 instead of +5:30 , but the first two date objects work fine , help me out