File tree Expand file tree Collapse file tree
src/post_processing/utils Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -129,12 +129,16 @@ def get_sun_times(
129129
130130 h_sunrise , h_sunset = [], []
131131
132- for date in [ts .date () for ts in date_range (start .normalize (),
133- stop .normalize (),
134- freq = "D" ,
135- )]:
136- dt_sunrise = sunrise (gps .observer , date = date , tzinfo = tz )
137- dt_sunset = sunset (gps .observer , date = date , tzinfo = tz )
132+ for date in [
133+ ts .date ()
134+ for ts in date_range (
135+ start .normalize (),
136+ stop .normalize (),
137+ freq = "D" ,
138+ )
139+ ]:
140+ dt_sunrise = Timestamp (sunrise (gps .observer , date = date )).tz_convert (tz )
141+ dt_sunset = Timestamp (sunset (gps .observer , date = date )).tz_convert (tz )
138142
139143 # Convert sunrise and sunset to decimal hours
140144 h_sunrise .append (dt_sunrise .hour + dt_sunrise .minute / 60 + dt_sunrise .second / 3600 + dt_sunrise .microsecond / 3_600_000_000 )
You can’t perform that action at this time.
0 commit comments