Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

File date #4667

Closed
mihaicris opened this issue Jan 9, 2015 · 2 comments
Closed

File date #4667

mihaicris opened this issue Jan 9, 2015 · 2 comments

Comments

@mihaicris
Copy link

@mihaicris mihaicris commented Jan 9, 2015

Hi,

I am not sure if this is an issue, but when I update one channel and there are new videos, the new file downloaded has a different file date than the date generated in the file name (the upload date).
If the file has been uploaded and downloaded on the same day 9.01 why the file date is 3.01?

2015-01-09_133022

Any idea why is this happening?

Thanks.

@phihag
Copy link
Contributor

@phihag phihag commented Jan 9, 2015

This is because the file modified time is determined during the actual download (i.e. it's the time associated with the file, presumably a timestamp of when the video got uploaded to YouTube) and upload_date is the time of publication (i.e. the time when the video was made available, and the time that is shown on the webpage).

You can pass in the --no-mtime option to disable mtime modification; the file modification time will them be the time of the download.

I do think that should answer what is happening. I am closing the issue now, but you are welcome to suggest a different behavior. What would you prefer? Bear in mind that the situation is quite complicated as it is with the introduction of timezones; also, depending on the extractor, we may just have the date 2015-01-09, and not a precise timestamp.

@phihag phihag closed this Jan 9, 2015
@mihaicris
Copy link
Author

@mihaicris mihaicris commented Jan 9, 2015

The option --no-mtime is doing as I would have expected, the file modification time is the download time.
I am not sure if this option should be the default since others might consider the Last-modified information better as default.
As far as I am concerned, using --no-mtime solved my problem.
Thanks. ... I must read the docs ;)

CMahaff added a commit to CMahaff/mumbledj that referenced this issue Aug 12, 2015
By default, the date on a file downloaded by youtube-dl is the date the video was originally uploaded to youtube. As a result, items will always be cleared from the cache because they appear to be years old - even though they were just downloaded. Adding the directive "--no-mtime" will make the date on files the date the file was downloaded.

See this issue on youtube-dl: ytdl-org/youtube-dl#4667
@cantbothertoshave cantbothertoshave mentioned this issue Jun 3, 2018
7 of 10 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.