frequenz-floss / frequenz-api-weather

gRPC+protobuf specification and Python bindings for the Frequenz Weather API
MIT License
0 stars 7 forks source link

Suport tz-aware timestamps in weather client #111

Open cwasicki opened 1 month ago

cwasicki commented 1 month ago

What happened?

Forecasts.to_ndarray does not work with timezone-aware datetime objects, but only with timezone-naive ones.

What did you expect instead?

Can be used with timezone-aware datetime objects.

Affected version(s)

No response

Affected part(s)

I don't know (part:❓)

Extra information

The problem could be the following comparison: https://github.com/frequenz-floss/frequenz-api-weather/blob/df8251c0c7801ea1703a89b006704274358d3b7e/py/frequenz/client/weather/_types.py#L210

llucax commented 1 month ago

This is another thing that betterproto got right, they use timezone-aware datetime objects.