diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libc/stdtime/strptime.3 | 10 | ||||
-rw-r--r-- | lib/libc/stdtime/strptime.c | 4 |
2 files changed, 7 insertions, 7 deletions
diff --git a/lib/libc/stdtime/strptime.3 b/lib/libc/stdtime/strptime.3 index b5dedbe..8e74a13 100644 --- a/lib/libc/stdtime/strptime.3 +++ b/lib/libc/stdtime/strptime.3 @@ -23,7 +23,7 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.\" $Id: strptime.3,v 1.2 1998/09/12 21:13:29 dt Exp $ +.\" $Id: strptime.3,v 1.3 1999/04/25 01:42:18 wes Exp $ .\" " .Dd May 8, 1997 .Dt STRPTIME 3 @@ -58,12 +58,12 @@ All conversion specifications are identical to those described in .Xr strftime 3 . .Pp Two-digit year values, including formats -.Fa %d +.Fa %y and .Fa %D , -are now interpreted as beginning at 1970 per POSIX requirements. -Years 70-99 are interpreted in the 20th century, years 00-69 in -the 21st century. +are now interpreted as beginning at 1969 per POSIX requirements. +Years 69-00 are interpreted in the 20th century (1969-2000), years +01-68 in the 21st century (2001-2068). .Sh RETURN VALUES Upon successful completion, .Fn strptime diff --git a/lib/libc/stdtime/strptime.c b/lib/libc/stdtime/strptime.c index f121d68..27437fe 100644 --- a/lib/libc/stdtime/strptime.c +++ b/lib/libc/stdtime/strptime.c @@ -53,7 +53,7 @@ #ifdef LIBC_RCS static const char rcsid[] = - "$Id: strptime.c,v 1.4 1998/09/12 21:13:29 dt Exp $"; + "$Id: strptime.c,v 1.5 1999/04/25 01:42:18 wes Exp $"; #endif #ifndef lint @@ -333,7 +333,7 @@ strptime(const char *buf, const char *fmt, struct tm *tm) } if (c == 'Y') i -= 1900; - if (c == 'y' && i < 70) + if (c == 'y' && i < 69) i += 100; if (i < 0) return 0; |