CURLINFO_FILETIME*.md: correct the examples

Only -1 means bad value, all others are acceptable.

Ref: #18424
Closes #18447
This commit is contained in:
Daniel Stenberg 2025-09-01 23:38:44 +02:00
parent 9598ccee59
commit e00cb001c6
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2
2 changed files with 2 additions and 2 deletions

View File

@ -58,7 +58,7 @@ int main(void)
if(CURLE_OK == res) {
long filetime = 0;
res = curl_easy_getinfo(curl, CURLINFO_FILETIME, &filetime);
if((CURLE_OK == res) && (filetime >= 0)) {
if((CURLE_OK == res) && (filetime != -1)) {
time_t file_time = (time_t)filetime;
printf("filetime: %s", ctime(&file_time));
}

View File

@ -59,7 +59,7 @@ int main(void)
if(CURLE_OK == res) {
curl_off_t filetime;
res = curl_easy_getinfo(curl, CURLINFO_FILETIME_T, &filetime);
if((CURLE_OK == res) && (filetime >= 0)) {
if((CURLE_OK == res) && (filetime != -1)) {
time_t file_time = (time_t)filetime;
printf("filetime: %s", ctime(&file_time));
}