Skip to content
This repository has been archived by the owner on Sep 11, 2023. It is now read-only.

PVDataSource should only correct PVOutput.org timezone on "legacy" PVOutput.org data #620

Open
JackKelly opened this issue Mar 17, 2022 · 1 comment
Labels
bug Something isn't working
Milestone

Comments

@JackKelly
Copy link
Member

JackKelly commented Mar 17, 2022

Since PRs openclimatefix/pvoutput#102 and openclimatefix/PVConsumer#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

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 openclimatefix/pvoutput#14 (comment)). 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.

@peterdudfield
Copy link
Contributor

perhaps #563 could be done first

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
No open projects
Status: Todo
Development

No branches or pull requests

2 participants