curl
curl has an '-z' option:
-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 modified 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 modification date (mtime) from <file> instead.
See the curl_getdate(3) man pages for date expression details.
So what you can do is:
$ curl http://stackoverflow.com/opensearch.xml -z opensearch.xml -o opensearch.xml
This will do actual download if remote file is younger than the local one (local file may absent - in this case it will be downloaded). Which seems to be exactly what you need...
wget
wget also has an option to track timestamps - -N
When running Wget with -N, with or without -r or -p, the decision as to whether
or not to download a newer copy of a file depends on the local and remote
timestamp and size of the file.
-N, --timestamping Turn on time-stamping.
So in case wget one can use:
$ wget -N http://stackoverflow.com/opensearch.xml