1--- 2c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al. 3SPDX-License-Identifier: curl 4Title: CURLOPT_TIMEVALUE_LARGE 5Section: 3 6Source: libcurl 7See-also: 8 - CURLINFO_FILETIME (3) 9 - CURLOPT_TIMECONDITION (3) 10 - CURLOPT_TIMEVALUE (3) 11Protocol: 12 - HTTP 13--- 14 15# NAME 16 17CURLOPT_TIMEVALUE_LARGE - time value for conditional 18 19# SYNOPSIS 20 21~~~c 22#include <curl/curl.h> 23 24CURLcode curl_easy_setopt(CURL *handle, CURLOPT_TIMEVALUE_LARGE, 25 curl_off_t val); 26~~~ 27 28# DESCRIPTION 29 30Pass a curl_off_t *val* as parameter. This should be the time counted as 31seconds since 1 Jan 1970, and the time is used in a condition as specified 32with CURLOPT_TIMECONDITION(3). 33 34The difference between this option and CURLOPT_TIMEVALUE(3) is the type 35of the argument. On systems where 'long' is only 32 bit wide, this option has 36to be used to set dates beyond the year 2038. 37 38# DEFAULT 39 400 41 42# EXAMPLE 43 44~~~c 45int main(void) 46{ 47 CURL *curl = curl_easy_init(); 48 if(curl) { 49 curl_easy_setopt(curl, CURLOPT_URL, "https://example.com"); 50 51 /* January 1, 2020 is 1577833200 */ 52 curl_easy_setopt(curl, CURLOPT_TIMEVALUE_LARGE, (curl_off_t)1577833200); 53 54 /* If-Modified-Since the above time stamp */ 55 curl_easy_setopt(curl, CURLOPT_TIMECONDITION, CURL_TIMECOND_IFMODSINCE); 56 57 /* Perform the request */ 58 curl_easy_perform(curl); 59 } 60} 61~~~ 62 63# AVAILABILITY 64 65Added in 7.59.0. 66 67# RETURN VALUE 68 69Returns CURLE_OK 70