openclimatefix / PVConsumer

Consumer PV data from various sources
Apache License 2.0
3 stars 1 forks source link

Add timezone to data #8

Closed peterdudfield closed 2 years ago

peterdudfield commented 2 years ago

Detailed Description

Need to wait until BST, and see what timezone pvoutput.org data is int

Context

Good to have Timezone properly defined, rather than guessing

Possible Implementation

somere in here,

peterdudfield commented 2 years ago

perhaps need this https://pandas.pydata.org/docs/reference/api/pandas.DatetimeIndex.tz_localize.html

JackKelly commented 2 years ago

Please see https://github.com/openclimatefix/pvoutput/issues/14

JackKelly commented 2 years ago

I'd vote for converting to UTC as far upstream as possible (in our pvoutput code?), and then adding an explicit UTC timezone identifier in pvoutput. In general, I think we should convert to/from localtime <-> UTC at the boundaries of our system, and then all our "internal" code can operate entirely on times in UTC :slightly_smiling_face:

JackKelly commented 2 years ago

FWIW, this is where we currently convert the timezone of the PVOutput.org data: https://github.com/openclimatefix/nowcasting_dataset/blob/main/nowcasting_dataset/data_sources/pv/pv_data_source.py#L403-L404

peterdudfield commented 2 years ago

Please see openclimatefix/pvoutput#14

good memory @JackKelly

peterdudfield commented 2 years ago

this is now complete, we have to tell it which timezone to put ont, and pvoutput repo puts the timezone on

code