From ab6f3da3ab70fced2274fe8f0fa84b9ac039fde3 Mon Sep 17 00:00:00 2001 From: Dan Date: Sat, 11 Dec 2021 18:30:37 -0500 Subject: [PATCH] Fix strftime discrepancy on video capture --- escrotum/main.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/escrotum/main.py b/escrotum/main.py index 058e39d..4f6669b 100755 --- a/escrotum/main.py +++ b/escrotum/main.py @@ -84,6 +84,8 @@ def __init__(self, filename=None, selection=False, xid=None, delay=None, self.set_keep_above(True) self.connect("draw", self.on_expose) + self.now = datetime.datetime.now() + if delay: if countdown: sys.stdout.write("Taking shot in ..%s" % delay) @@ -394,7 +396,7 @@ def on_owner_change(self, clipboard, event): exit() def _expand_argument(self, width, height, string): - string = datetime.datetime.now().strftime(string) + string = self.now.strftime(string) string = string.replace("$w", str(width)) string = string.replace("$h", str(height)) string = os.path.expanduser(string)