xref: /curl/docs/cmdline-opts/time-cond.md (revision 911fc964)
1---
2c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
3SPDX-License-Identifier: curl
4Long: time-cond
5Short: z
6Arg: <time>
7Help: Transfer based on a time condition
8Protocols: HTTP FTP
9Category: http ftp
10Added: 5.8
11Multi: single
12See-also:
13  - etag-compare
14  - remote-time
15Example:
16  - -z "Wed 01 Sep 2021 12:18:00" $URL
17  - -z "-Wed 01 Sep 2021 12:18:00" $URL
18  - -z file $URL
19---
20
21# `--time-cond`
22
23Request a file that has been modified later than the given time and date, or
24one that has been modified before that time. The date expression can be all
25sorts of date strings or if it does not match any internal ones, it is treated
26as a filename and curl tries to get the modification date (mtime) from that
27file instead. See the *curl_getdate(3)* man pages for date expression details.
28
29Start the date expression with a dash (-) to make it request for a document
30that is older than the given date/time, default is a document that is newer
31than the specified date/time.
32
33If provided a non-existing file, curl outputs a warning about that fact and
34proceeds to do the transfer without a time condition.
35