#1103 -z/--time-cond does not mention mtime

closed-accepted
5
2013-06-21
2012-03-23
MestreLion
No

In my system (Ubuntu 10.10, using curl 7.21.0), manual says:

-z/--time-cond <date expression>
(HTTP/FTP) Request a file that has been modified later than the given time and date, or one that has been modi‐
fied before that time. The date expression can be all sorts of date strings or if it doesn't match any internal
ones, it tries to get the time from a given file name instead! See the curl_getdate(3) man pages for date
expression details.

The wording "it tries to get the time from a given file name instead!" can lead users in thinking it tries to somehow parse the filename for a date expression (like news_2012_03_05.html). It never mentions that it actually reads the mtime of the file in filesystem.(which is great!)

So I suggest the following:

-z/--time-cond <date expression>|<file>
(HTTP/FTP) Request a file that has been modified later than the given time and date, or one that has been modi‐
fied before that time. The <date expression> can be all sorts of date strings or if it doesn't match any internal
ones, it is taken as a filename and tries to get the modified time (mtime) from <file> instead. See the
curl_getdate(3) man pages for date expression details.

Discussion

  • MestreLion

    MestreLion - 2012-03-23

    The attached patch has a slightly different wording than the original suggestion: "... it is taken as a filename and tries to get the modification date (mtime) from <file> instead"

     
  • Daniel Stenberg

    Daniel Stenberg - 2012-03-23
    • status: open --> closed-accepted