Explorar o código

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.
Thomas Waldmann %!s(int64=8) %!d(string=hai) anos
pai
achega
6133f1bb60
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/borg/helpers/parseformat.py

+ 1 - 1
src/borg/helpers/parseformat.py

@@ -899,7 +899,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: