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