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

time-cond doesn't work for files with date before 1970-01-01 #11785

Closed
piru opened this issue Sep 1, 2023 · 1 comment
Closed

time-cond doesn't work for files with date before 1970-01-01 #11785

piru opened this issue Sep 1, 2023 · 1 comment

Comments

@piru
Copy link

piru commented Sep 1, 2023

I did this

touch -d '1969-12-31T00:00:00Z' reallyold.txt
curl --time-cond reallyold.txt -I https://curl.se

I expected the following

The date before 1970-01-01 being considered valid.

curl/libcurl version

curl 8.2.1

operating system

macOS 13.5.1 (22G90)

@piru
Copy link
Author

piru commented Sep 1, 2023

Root cause is here:

if(filetime >= 0) {

getfiletime should probably be changed to return success/failure indicator and store the time to curl_off_t * on success.

bagder added a commit that referenced this issue Sep 1, 2023
bagder added a commit that referenced this issue Sep 1, 2023
bagder added a commit that referenced this issue Sep 1, 2023
@bagder bagder closed this as completed in dffd996 Sep 3, 2023
ptitSeb pushed a commit to wasix-org/curl that referenced this issue Sep 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

1 participant