I have what I thought was a simple problem but it is becoming more confusing as I read more and browse the questions on this forum . I apologize if this has been asked earlier but so far I could not find out any source which treats both the steps mentioned below together.
Problem: I have got a dataframe with time like this (without mentioning the timezone or offset)
Date Time
2020-01-02 22:00:00
2020-01-03 01:00:00
2002-01-03 01:05:00
and so on. These times are in EST. EST follows daylight savings time
I need to convert this into Japan standard time which does not follow daylight savings time
So first, I need to convert the time 2020-01-02 22:00:00 into EST datetime object. I was going to use datetime.strptime but I don't know where to put the timezone.
Next, I need to convert the EST datetime object into japan standard time. But I am not sure if python will automatically figure out when the daylight savings time started in US EST timezone. There have been some changes by US congress in the past and so , how will Python know about this. Similarly, if in future there are some changes by US congress e.g. they remove daylight savings time, will we able to keep the same code by just updating the python routines for timezone.
Thank you for any inputs