Adds pytz as a dependency, this was necessary since datetime apparently does not contain any tzinfo instances and it is better than reinventing the wheel.
The problem was that apparently datetime.strptime does not create timezone-aware datetime objects even when %Z (timezone name) is used as part of the format string. datetime.now() without tzinfo parameter creates a timezone-naive datetime object as well but defaults to local time for the actual values instead of the more sensible UTC.
As a further suggestion for latter improvements I would suggest formatting the dates in the API as ISO8601 dates instead of the current ones which contain localized weekday and month names. I did not do this for now since i did not want to modify multiple components for this PR.
Adds pytz as a dependency, this was necessary since datetime apparently does not contain any tzinfo instances and it is better than reinventing the wheel.
The problem was that apparently datetime.strptime does not create timezone-aware datetime objects even when %Z (timezone name) is used as part of the format string. datetime.now() without tzinfo parameter creates a timezone-naive datetime object as well but defaults to local time for the actual values instead of the more sensible UTC.
As a further suggestion for latter improvements I would suggest formatting the dates in the API as ISO8601 dates instead of the current ones which contain localized weekday and month names. I did not do this for now since i did not want to modify multiple components for this PR.