瀏覽代碼

add {unixtime} placeholder, fixes #8522

Abhijeet 3 月之前
父節點
當前提交
4eef6178e4
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      src/borg/helpers/parseformat.py

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

@@ -280,6 +280,7 @@ def _replace_placeholders(text, overrides={}):
         "hostname": hostname,
         "now": DatetimeWrapper(current_time.astimezone()),
         "utcnow": DatetimeWrapper(current_time),
+        "unixtime": int(current_time.timestamp()),
         "user": getosusername(),
         "uuid4": str(uuid.uuid4()),
         "borgversion": borg_version,