ENH: Support datetime.time objects with tzinfo in between_time and at_time · Issue #24043 · pandas-dev/pandas (original) (raw)
The functions for DataFrame, "between_time" and "at_time" are unfortunately not time zone aware.
I suggest adding a timezone parameter to these functions to clearly specify which time zone the requested time belongs to. The sampler should take into account the time zone of data frame, and the supplied time zone.
It will also be interesting to be able to sample at a specific time both daylight savings adjustment aware and agnostic. For example it will be interesting to sample at every 09:00 New York time (whether it is summer time or winter time, and irrespective of how we stored the time in our dataframe). For this a time zone parameter will not be sufficient, a time zone history will need to be supplied.
Time zone history for a specific city can be obtained by the user and supplied to the function:
https://www.timeanddate.com/time/zone/usa/new-york