From c2e774d3f5a4499b8beb5a12ab46a0099b16b1e7 Mon Sep 17 00:00:00 2001 From: Unit 193 Date: Tue, 15 Mar 2022 00:19:57 -0400 Subject: New upstream version 1.21.0. --- gallery_dl/path.py | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'gallery_dl/path.py') diff --git a/gallery_dl/path.py b/gallery_dl/path.py index 15db67f..c85bb88 100644 --- a/gallery_dl/path.py +++ b/gallery_dl/path.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -# Copyright 2021 Mike Fährmann +# Copyright 2021-2022 Mike Fährmann # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as @@ -10,10 +10,8 @@ import os import re -import time import shutil import functools -from email.utils import mktime_tz, parsedate_tz from . import util, formatter, exception WINDOWS = util.WINDOWS @@ -327,10 +325,4 @@ class PathFormat(): mtime = self.kwdict.get("_mtime") if mtime: - # Set file modification time - try: - if isinstance(mtime, str): - mtime = mktime_tz(parsedate_tz(mtime)) - os.utime(self.realpath, (time.time(), mtime)) - except Exception: - pass + util.set_mtime(self.realpath, mtime) -- cgit v1.2.3