Skip to content

A feature-rich command-line audio/video downloader

Ignore invalid dates (Fixes #894)

Philipp Hagemeisterbb4743768684
diff --git a/youtube_dl/FileDownloader.py b/youtube_dl/FileDownloader.py
index 72f03c2179..f4ce48046f 100644
--- a/youtube_dl/FileDownloader.py
+++ b/youtube_dl/FileDownloader.py
@@ -322,6 +322,9 @@ class FileDownloader(object):
filetime = timeconvert(timestr)
if filetime is None:
return filetime
+ # Ignore obviously invalid dates
+ if filetime == 0:
+ return
try:
os.utime(filename, (time.time(), filetime))
except: