Skip to content

Commit

Permalink
Used timestamp instead of time.time
Browse files Browse the repository at this point in the history
  • Loading branch information
abhijeetsharma200 committed Feb 23, 2025
1 parent e5be6c1 commit 64aa901
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/borg/helpers/parseformat.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
from typing import Dict, Set, Tuple, ClassVar, Any, TYPE_CHECKING, Literal
from collections import OrderedDict
from datetime import datetime, timezone
import time
from functools import partial
from string import Formatter

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

0 comments on commit 64aa901

Please sign in to comment.