nowcasting_dataset
nowcasting_dataset copied to clipboard
`PVDataSource` should only correct PVOutput.org timezone on "legacy" PVOutput.org data
Since PRs https://github.com/openclimatefix/pvoutput/pull/102 and https://github.com/openclimatefix/PVConsumer/pull/11, our PVConsumer code will convert datetimes to UTC. But nowcasting_dataset assumes that PVOutput.org data is in Europe/London timezone (see these two lines of code in nowcasting_dataset). Somehow, nowcasting_dataset needs to know if the PVOutput.org is already in UTC, or if it still needs to be converted from localtime to UTC.
Context
- https://github.com/openclimatefix/pvoutput/issues/14
- https://github.com/openclimatefix/pvoutput/pull/102
- https://github.com/openclimatefix/PVConsumer/pull/11
- https://github.com/openclimatefix/PVConsumer/issues/8
Implementation
Perhaps the easiest solution might be to convert the PVOutput.org data we currently have on disk to UTC, and then remove these two lines from nowcasting_dataset.
Or, perhaps a better solution would be to modify pvoutput so it explicitly sets the timezone to UTC on all the datetimes (see https://github.com/openclimatefix/pvoutput/issues/14#issuecomment-1070456676). Then nowcasting_dataset would only assume PVOutput.org data needs converting from Europe/London timezone to UTC if the timestamps lack an explicit UTC offset.
perhaps #563 could be done first