📄 curl_getdate.3
字号:
.\" You can view this file with:.\" nroff -man [file].\" $Id: curl_getdate.3,v 1.1 2002/03/04 10:09:49 bagder Exp $.\".TH curl_getdate 3 "5 March 2001" "libcurl 7.0" "libcurl Manual".SH NAMEcurl_getdate - Convert an date in a ASCII string to number of seconds sinceJanuary 1, 1970.SH SYNOPSIS.B #include <curl/curl.h>.sp.BI "time_t curl_getdate(char *" datestring ", time_t *"now" );.ad.SH DESCRIPTIONThis function returns the number of seconds since January 1st 1970, for thedate and time that the.I datestringparameter specifies. The .I nowparameter is there and should hold the current time to allow the datestring tospecify relative dates/times. Read further in the date string parser sectionbelow..SH PARSING DATES AND TIMESA "date" is a string, possibly empty, containing many items separated bywhitespace. The whitespace may be omitted when no ambiguity arises. Theempty string means the beginning of today (i.e., midnight). Order of theitems is immaterial. A date string may contain many flavors of items:.TP 0.8i.B calendar date itemsThis can be specified in a number of different ways. Including 1970-09-17, 70-9-17, 70-09-17, 9/17/72, 24 September 1972, 24 Sept 72, 24 Sep 72, Sep 24, 1972, 24-sep-72, 24sep72.The year can also be omitted, for example: 9/17 or "sep 17"..TP.B time of the day itemsThis string specifies the time on a given day. Syntax supported includes:18:19:0, 18:19, 6:19pm, 18:19-0500 (for specifying the time zone as well)..TP.B time zone itemsSpecifies international time zone. There are a few acronyms supported, but ingeneral you should instead use the specific realtive time compared toUTC. Supported formats include: -1200, MST, +0100..TP.B day of the week itemsSpecifies a day of the week. If this is mentioned alone it means that day ofthe week in the future.Days of the week may be spelled out in full: `Sunday', `Monday', etc or theymay be abbreviated to their first three letters, optionally followed by aperiod. The special abbreviations `Tues' for `Tuesday', `Wednes' for`Wednesday' and `Thur' or `Thurs' for `Thursday' are also allowed.A number may precede a day of the week item to move forward supplementaryweeks. It is best used in expression like `third monday'. In this context,`last DAY' or `next DAY' is also acceptable; they move one week before orafter the day that DAY by itself would represent..TP.B relative itemsA relative item adjusts a date (or the current date if none) forward orbackward. Example syntax includes: "1 year", "1 year ago", "2 days", "4weeks".The string `tomorrow' is worth one day in the future (equivalent to `day'),the string `yesterday' is worth one day in the past (equivalent to `day ago')..TP.B pure numbersIf the decimal number is of the form YYYYMMDD and no other calendar date itemappears before it in the date string, then YYYY is read as the year, MM as themonth number and DD as the day of the month, for the specified calendar date..PP.SH RETURN VALUEThis function returns zero when it fails to parse the date string. Otherwiseit returns the number of seconds as described..SH AUTHORSOriginally written by Steven M. Bellovin <smb@research.att.com> while at theUniversity of North Carolina at Chapel Hill. Later tweaked by a couple ofpeople on Usenet. Completely overhauled by Rich $alz <rsalz@bbn.com> and JimBerets <jberets@bbn.com> in August, 1990..SH "SEE ALSO".BR .SH BUGSSurely there are some, you tell me!
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -