You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
detect_clearsky and prilliman fail on DST days, kimber fails on tz-naive data (since #2924) #2935
On main (0f6631a, pandas 3.1.0), both of these worked before #2924 and now raise:
importpandasaspdimportpvlibloc=pvlib.location.Location(49.28, -123.12, tz='America/Vancouver')
times=pd.date_range('2026-03-07', '2026-03-10', freq='1min',
tz=loc.tz, inclusive='left')
ghi=loc.get_clearsky(times)['ghi']
pvlib.clearsky.detect_clearsky(ghi, ghi)
# NotImplementedError: algorithm does not yet support unequal time intervals...rain=pd.Series(0.0, index=pd.date_range('2026-01-01', periods=720, freq='h'))
pvlib.soiling.kimber(rain)
# TypeError: Cannot convert tz-naive timestamps, use tz_localize to localize
In _get_sample_intervals, tz_localize(None) turns the index into local clock time, so the 1-minute data gets a 61-minute step where the clocks change. temperature.prilliman uses the same helper, so it fails the same way.
Plus two tests: detect_clearsky on a DST day should match the same data in UTC, and kimber with a tz-naive index should match the existing expected output.
I tried this locally:
both new tests fail on main and pass with the change;
test_clearsky.py, test_soiling.py, test_temperature.py and test_tools.py pass on pandas 3.1.0 and 2.3.3;
Activity