CURLOPT_TIMEVALUE_LARGE.3 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. .\" **************************************************************************
  2. .\" * _ _ ____ _
  3. .\" * Project ___| | | | _ \| |
  4. .\" * / __| | | | |_) | |
  5. .\" * | (__| |_| | _ <| |___
  6. .\" * \___|\___/|_| \_\_____|
  7. .\" *
  8. .\" * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
  9. .\" *
  10. .\" * This software is licensed as described in the file COPYING, which
  11. .\" * you should have received as part of this distribution. The terms
  12. .\" * are also available at https://curl.se/docs/copyright.html.
  13. .\" *
  14. .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  15. .\" * copies of the Software, and permit persons to whom the Software is
  16. .\" * furnished to do so, under the terms of the COPYING file.
  17. .\" *
  18. .\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
  19. .\" * KIND, either express or implied.
  20. .\" *
  21. .\" * SPDX-License-Identifier: curl
  22. .\" *
  23. .\" **************************************************************************
  24. .\"
  25. .TH CURLOPT_TIMEVALUE_LARGE 3 "January 02, 2023" "libcurl 7.88.1" "curl_easy_setopt options"
  26. .SH NAME
  27. CURLOPT_TIMEVALUE_LARGE \- time value for conditional
  28. .SH SYNOPSIS
  29. .nf
  30. #include <curl/curl.h>
  31. CURLcode curl_easy_setopt(CURL *handle, CURLOPT_TIMEVALUE_LARGE,
  32. curl_off_t val);
  33. .fi
  34. .SH DESCRIPTION
  35. Pass a curl_off_t \fIval\fP as parameter. This should be the time counted as
  36. seconds since 1 Jan 1970, and the time will be used in a condition as
  37. specified with \fICURLOPT_TIMECONDITION(3)\fP.
  38. The difference between this option and \fICURLOPT_TIMEVALUE(3)\fP is the type
  39. of the argument. On systems where 'long' is only 32 bit wide, this option has
  40. to be used to set dates beyond the year 2038.
  41. .SH DEFAULT
  42. 0
  43. .SH PROTOCOLS
  44. HTTP, FTP, RTSP, and FILE
  45. .SH EXAMPLE
  46. .nf
  47. CURL *curl = curl_easy_init();
  48. if(curl) {
  49. curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
  50. /* January 1, 2020 is 1577833200 */
  51. curl_easy_setopt(curl, CURLOPT_TIMEVALUE_LARGE, (curl_off_t)1577833200);
  52. /* If-Modified-Since the above time stamp */
  53. curl_easy_setopt(curl, CURLOPT_TIMECONDITION, CURL_TIMECOND_IFMODSINCE);
  54. /* Perform the request */
  55. curl_easy_perform(curl);
  56. }
  57. .fi
  58. .SH AVAILABILITY
  59. Added in 7.59.0.
  60. .SH RETURN VALUE
  61. Returns CURLE_OK
  62. .SH "SEE ALSO"
  63. .BR CURLOPT_TIMECONDITION "(3), "
  64. .BR CURLOPT_TIMEVALUE_LARGE "(3), "