GNURLOPT_TIMEVALUE_LARGE(3)
π GNURLOPT_TIMEVALUE_LARGE(3) π
okay bestie, welcome to the GNURLOPT_TIMEVALUE_LARGE(3) glow-up π
this page lives in the curl_easy_setopt options manual, and itβs all about setting a time value for a conditional. no cap, itβs niche but iconic.
πΈ NAME πΈ
CURLOPT_TIMEVALUE_LARGEβ set time value for conditional
β¨ SYNOPSIS β¨
#include <gnurl/curl.h>
CURLcode curl_easy_setopt(CURL *handle, CURLOPT_TIMEVALUE_LARGE,
curl_off_t val);
π DESCRIPTION π
Pass a curl_off_t val as parameter, bestie. This should be the time counted as seconds since 1 Jan 1970, and the time will be used in a condition as specified with CURLOPT_TIMECONDITION(3).
The difference between this option and CURLOPT_TIMEVALUE(3) is the type of the argument. On systems where long is only 32 bit wide, this option has to be used to set dates beyond the year 2038. yes, thatβs the whole reason it exists β itβs giving βwe prepared for the futureβ energy π₯
π DEFAULT π
The default is 0. simple, clean, zero. periodt.
π¦ PROTOCOLS π¦
This one is for HTTP, FTP, RTSP, and FILE. all four, exactly like that. π«Ά
π EXAMPLE π
CURL *curl = curl_easy_init();
if(curl) {
curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
/* January 1, 2020 is 1577833200 */
curl_easy_setopt(curl, CURLOPT_TIMEVALUE_LARGE, (curl_off_t)1577833200);
/* If-Modified-Since the above time stamp */
curl_easy_setopt(curl, CURLOPT_TIMECONDITION, CURL_TIMECOND_IFMODSINCE);
/* Perform the request */
curl_easy_perform(curl);
}
literally the whole little ritual: init, set URL, set the large time value, set the time condition, perform. slay. β¨
β AVAILABILITY β
Added in 7.59.0. note it, bestie π
π₯ RETURN VALUE π₯
Returns CURLE_OK. thatβs it, thatβs the return value. π
π SEE ALSO π
See also: CURLOPT_TIMECONDITION(3), CURLOPT_TIMEVALUE_LARGE(3), β yes, comma and all, because we keep the details exact around here π«Ά
thatβs the whole page, bestie β brought to you by libcurl 7.59.0, dated 25 Jan 2018, with the footer name GNURLOPT_TIMEVALUE_LARGE(3). mwah πβ¨π
π¦ where this page comes from
- nixos 26.05: libgnurl 7.72.0
- nixpkgs unstable: libgnurl 7.72.0
- Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms