1CURLOPT_TIMEVALUE(3)       curl_easy_setopt options       CURLOPT_TIMEVALUE(3)
2
3
4

NAME

6       CURLOPT_TIMEVALUE - set time value for conditional
7

SYNOPSIS

9       #include <curl/curl.h>
10
11       CURLcode curl_easy_setopt(CURL *handle, CURLOPT_TIMEVALUE, long val);
12

DESCRIPTION

14       Pass  a  long val as parameter. This should be the time counted as sec‐
15       onds since 1 Jan 1970, and the time will be  used  in  a  condition  as
16       specified with CURLOPT_TIMECONDITION(3).
17
18       On  systems  with 32 bit 'long' variables, this option cannot set dates
19       beyond the year 2038. Consider CURLOPT_TIMEVALUE_LARGE(3) instead.
20

DEFAULT

22       0
23

PROTOCOLS

25       HTTP, FTP, RTSP, and FILE
26

EXAMPLE

28       CURL *curl = curl_easy_init();
29       if(curl) {
30         curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
31
32         /* January 1, 2020 is 1577833200 */
33         curl_easy_setopt(curl, CURLOPT_TIMEVALUE, 1577833200L);
34
35         /* If-Modified-Since the above time stamp */
36         curl_easy_setopt(curl, CURLOPT_TIMECONDITION, CURL_TIMECOND_IFMODSINCE);
37
38         /* Perform the request */
39         curl_easy_perform(curl);
40       }
41

AVAILABILITY

43       Always
44

RETURN VALUE

46       Returns CURLE_OK
47

SEE ALSO

49       CURLOPT_TIMECONDITION(3),
50
51
52
53libcurl 7.71.1                 January 25, 2018           CURLOPT_TIMEVALUE(3)
Impressum