GIScience / ohsome-py

Python bindings for the ohsome API
GNU General Public License v3.0
18 stars 4 forks source link

Check timestamp with tz #132

Closed rp280 closed 10 months ago

redfrexx commented 11 months ago

So the ohsome API always returns a timestamp with timezone (i.e. the Z in the end). ohsome-py returned timestamp objects without timezone in the functions where format="%Y-%m-%dT%H:%M:%SZ". I would prefer always returning a timestamp object with UTC timezone for convenience so the python users knows right away that it is UTC. Other opinions?

SlowMo24 commented 11 months ago

I favour timestamps without time-zone. I never had a benefit only nuisance. For example you can note time zones differently (e.g. z== +00:00, yet the ohsome api does not support all these notions. That is why we had to remove the Zin #127

As you say: "everything is in UTC" so there is no benefit in marking that fact explicitly.

redfrexx commented 11 months ago

True, I forgot about the 3.10 issue. Then let's have the timestamp without time zones. @rp280 can you adapt the code accordingly?

rp280 commented 11 months ago

A Test for Issue #121 was also created in this Pull Request