master-server/deps/curl/docs/cmdline-opts/time-cond.md

35 lines
1.1 KiB
Markdown
Raw Normal View History

2024-05-15 15:20:32 -04:00
---
2023-12-11 20:30:44 -05:00
c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
SPDX-License-Identifier: curl
Long: time-cond
Short: z
Arg: <time>
Help: Transfer based on a time condition
Protocols: HTTP FTP
Category: http ftp
Added: 5.8
Multi: single
2024-05-15 15:20:32 -04:00
See-also:
- etag-compare
- remote-time
Example:
- -z "Wed 01 Sep 2021 12:18:00" $URL
- -z "-Wed 01 Sep 2021 12:18:00" $URL
- -z file $URL
2023-12-11 20:30:44 -05:00
---
2024-05-15 15:20:32 -04:00
# `--time-cond`
2023-12-11 20:30:44 -05:00
Request a file that has been modified later than the given time and date, or
2024-05-15 15:20:32 -04:00
one that has been modified before that time. The date expression can be all
sorts of date strings or if it does not match any internal ones, it is treated
as a filename and curl tries to get the modification date (mtime) from that
file instead. See the *curl_getdate(3)* man pages for date expression details.
2023-12-11 20:30:44 -05:00
Start the date expression with a dash (-) to make it request for a document
that is older than the given date/time, default is a document that is newer
than the specified date/time.
If provided a non-existing file, curl outputs a warning about that fact and
proceeds to do the transfer without a time condition.