소스 검색

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,