mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-03-16 22:10:26 +00:00
Replace deprecated datetime.utcfromtimestamp()
This commit is contained in:
parent
6b239aae12
commit
7763704067
1 changed files with 3 additions and 2 deletions
|
|
@ -21,7 +21,7 @@ import re
|
|||
import os
|
||||
import urllib.parse
|
||||
import urllib.request
|
||||
from datetime import datetime
|
||||
from datetime import datetime, timezone
|
||||
|
||||
from . import urlbase, get_index_html
|
||||
from .. import log, LOG_CHECK, fileutil, mimeutil, LinkCheckerError, url as urlutil
|
||||
|
|
@ -185,7 +185,8 @@ class FileUrl(urlbase.UrlBase):
|
|||
return
|
||||
filename = self.get_os_filename()
|
||||
self.size = fileutil.get_size(filename)
|
||||
self.modified = datetime.utcfromtimestamp(fileutil.get_mtime(filename))
|
||||
self.modified = datetime.fromtimestamp(
|
||||
fileutil.get_mtime(filename), tz=timezone.utc)
|
||||
|
||||
def check_connection(self):
|
||||
"""
|
||||
|
|
|
|||
Loading…
Reference in a new issue