浏览代码

Fix #8522: Add {unixtime} placeholders (1.4-maint) (#8675)

Abhijeet 3 月之前
父节点
当前提交
8e6dc52a8a
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      src/borg/helpers/parseformat.py

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

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