I have a bunch of time objects stored in a database but they are all naive objects. The time they store is in 'JST' or 'Asia/Tokyo' tz. I tried using
naive_time.replace(tzinfo = pytz.timezone('Asia/Tokyo'))
but this sets it to LMT+09:19:00 which is incorrect, it should be LMT+09:00:00. Any suggestions to do it rightly.
Edit:
The database returns the time as datatime.time
object with tzinfo=None
like datetime.time(1, 0)
. I assigned this to t and tried
t.replace(tzinfo = pytz.timezone('Asia/Tokyo'))
which gave
datetime.time(1, 0, tzinfo=<DstTzInfo 'Asia/Tokyo' LMT+9:19:00 STD>)
but 'Asia/Tokyo' or JST is 9 hours ahead of LMT not 9 hours 19 minutes.