.\" 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
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
.BR TZ ", " LC_TIME
Variables used by
.BR strptime (3).
+.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
.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"
.SS Program source
\&
.nf
-#define _GNU_SOURCE 500
+#define _GNU_SOURCE
#include <time.h>
#include <stdio.h>
#include <stdlib.h>
.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/.