energyquantified / eq-python-client

Python library for Energy Quantified's Time Series API.
https://energyquantified-python.readthedocs.io/
Apache License 2.0
15 stars 2 forks source link

The curve's timezone does not match the one in the JSON #72

Closed komape closed 1 year ago

komape commented 1 year ago

Take the following JSON:

{
    "curve": {
        // ....
        "resolution": {
            "frequency": "NONE",
            "timezone": "CET"
        },
        // ...
    },
    "resolution": {
        "frequency": "NONE",
        "timezone": "EET"
    },
    "data": //...
}

The curve has a timezone that cannot be changed. It's fixed. In contrast, the resolution's timezone can be changed by passing the timezone parameter. In the example above it was changed from CET to EET. Parsing the JSON, the timezone (and frequency) from the resolution object is taken and added to the curve object in Python. Also see parser/metadata.py lines 30 to 32 and lines 58 to 59. This can be misleading.

Is this behaviour intended? Should we keep it like this or find another solution?