From 32174dd9c885e2267a939cb81fe2d4130308d487 Mon Sep 17 00:00:00 2001 From: Thomas Waldmann Date: Sun, 6 Aug 2017 02:22:38 +0200 Subject: [PATCH] repo last_modified: use iso8601 timestamp format with --json like yyyy-mm-ddThh:mm:ss - no tz yet, this likely needs more refactoring to tz aware and utc datetime objects everywhere, currently there are naive datetime objects and also localtime at quite some places. --- src/borg/helpers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/borg/helpers.py b/src/borg/helpers.py index 4d63c7437..cea6b1b80 100644 --- a/src/borg/helpers.py +++ b/src/borg/helpers.py @@ -2150,7 +2150,7 @@ def basic_json_data(manifest, *, cache=None, extra=None): 'mode': key.ARG_NAME, }, }) - data['repository']['last_modified'] = format_time(to_localtime(manifest.last_timestamp.replace(tzinfo=timezone.utc))) + data['repository']['last_modified'] = isoformat_time(to_localtime(manifest.last_timestamp.replace(tzinfo=timezone.utc))) if key.NAME.startswith('key file'): data['encryption']['keyfile'] = key.find_key() if cache: