JSON: Use a more standard, timezone-aware format date time format
Cf. #2368
Can be implemented similar to the output-type dependent file-size formatting.
This is a fairly simple change, but I think it should really be made for 1.1.
@enkore borg currently does a lot using localtime, but has no real timezone support (likely would require pytz). So I am not totally sure that even now all timestamps shown are totally correct (esp. regarding tzoffset and dst).
So how's your idea about this change being "fairly simple"?
This issue would just be about using a ISO8601 format (and output in UTC), not true TZ support, which would probably be bigger.
This probably means to do a wrapper like that used for file-size formatting. It would convert to localtime + human format for __str__ and be converted to isoformat() for JSON.
I am not sure this can be done cleanly without having aware datetime objects everywhere, so it might need a bit more work than just using a different format string (because if we say it is utc, we should be pretty sure it is).
A first step could be to use the yyyy-mm-ddThh:mm:ss format without tz (so, no weekday and the T separator would be the difference to the human-readable iso-like format we use).
partially addressed by #2925 (no tz yet), nothing to do left for 1.1 milestone.
Would it maybe be an option for 1.2 to begin with storing an additional datetime with timezone for archive start and end times? And maybe also output them via (possibly unstable/transient x-start-tz) json keys, if a datetime with timezone is available as well?
@ThomasWaldmann Maybe 2.0 is a good chance for doing everything properly with timezones?
Yeah, would be good timing. But already a ton of other todo, do you want to work on it?
I started working on it...
Python (C?) wart: seems like strftime and strptime disagree on tz being with/without ":" between HH and MM.