X-Git-Url: http://git.osdn.net/view?p=linuxjm%2FLDP_man-pages.git;a=blobdiff_plain;f=original%2Fman3%2Fgetdate.3;h=5da786c822e6cd84a7838641b2ab60b0ccad6131;hp=7f30f9c5b9bd581bdfd89bf9624955032de3d767;hb=4ea6bb24817f6f049d6bbc90ecd77a869876f9b0;hpb=8fbe23d0114c8804c4cfb5b6c57f3ca09c8fee1d diff --git a/original/man3/getdate.3 b/original/man3/getdate.3 index 7f30f9c5..5da786c8 100644 --- a/original/man3/getdate.3 +++ b/original/man3/getdate.3 @@ -2,6 +2,7 @@ .\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk .\" .\" +.\" %%%LICENSE_START(VERBATIM) .\" Permission is granted to make and distribute verbatim copies of this .\" manual provided the copyright notice and this permission notice are .\" preserved on all copies. @@ -21,11 +22,12 @@ .\" .\" Formatted or processed versions of this manual, if unaccompanied by .\" the source, must acknowledge the copyright and authors of this work. +.\" %%%LICENSE_END .\" .\" Modified, 2001-12-26, aeb .\" 2008-09-07, mtk, Various rewrites; added an example program. .\" -.TH GETDATE 3 2010-09-20 "" "Linux Programmer's Manual" +.TH GETDATE 3 2014-06-13 "" "Linux Programmer's Manual" .SH NAME getdate, getdate_r \- convert a date-plus-time string to broken-down time .SH SYNOPSIS @@ -107,7 +109,8 @@ Otherwise, the structure is initialized to the broken-down time corresponding to the current local time (as by a call to .BR localtime (3)). .LP -When only the weekday is given, the day is taken to be the first such day +When only the day of the week is given, +the day is taken to be the first such day on or after today. .LP When only the month is given (and no year), the month is taken to @@ -129,7 +132,7 @@ it returns errors via the function result value, and returns the resulting broken-down time in the caller-allocated buffer pointed to by the argument .IR res . -.SH "RETURN VALUE" +.SH RETURN VALUE When successful, .BR getdate () returns a pointer to a @@ -190,7 +193,16 @@ File containing format patterns. .BR TZ ", " LC_TIME Variables used by .BR strptime (3). -.SH "CONFORMING TO" +.SH ATTRIBUTES +.SS Multithreading (see pthreads(7)) +The +.BR getdate () +function is not thread-safe. +.LP +The +.BR getdate_r () +function is thread-safe. +.SH CONFORMING TO POSIX.1-2001. .SH NOTES The POSIX.1-2001 specification for @@ -218,7 +230,7 @@ The following shell session demonstrates the operation of the program: .in +4n .nf .RB "$" " TFILE=$PWD/tfile" -.RB "$" " echo \(aq%A\(aq > $TFILE " " # Full weekday name" +.RB "$" " echo \(aq%A\(aq > $TFILE " " # Full name of the day of the week" .RB "$" " echo \(aq%T\(aq >> $TFILE" " # ISO date (YYYY-MM-DD)" .RB "$" " echo \(aq%F\(aq >> $TFILE" " # Time (HH:MM:SS)" .RB "$" " date" @@ -260,7 +272,7 @@ Call 3 ("12:22:33") succeeded: .SS Program source \& .nf -#define _GNU_SOURCE 500 +#define _GNU_SOURCE #include #include #include @@ -295,9 +307,18 @@ main(int argc, char *argv[]) exit(EXIT_SUCCESS); } .fi -.SH "SEE ALSO" +.SH SEE ALSO .BR time (2), .BR localtime (3), .BR setlocale (3), .BR strftime (3), .BR strptime (3) +.SH COLOPHON +This page is part of release 3.79 of the Linux +.I man-pages +project. +A description of the project, +information about reporting bugs, +and the latest version of this page, +can be found at +\%http://www.kernel.org/doc/man\-pages/.