Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 31 Mar 1999 23:43:01 -0700
From:      Wes Peters <wes@softweyr.com>
To:        Sergey Babkin <babkin@bellatlantic.net>
Cc:        hackers@FreeBSD.ORG
Subject:   Re: Y2K issue
Message-ID:  <37031575.F7A2399D@softweyr.com>
References:  <3702BF79.EE5801AE@bellatlantic.net>

next in thread | previous in thread | raw e-mail | index | archive | help
Sergey Babkin wrote:
> 
> Hi!
> 
> I do some Y2K testing for my employer, so I have run some of the Y2K
> tests on FreeBSD too. In particular, this one:
> 
> ftp://ftp.rdg.opengroup.org/pub/unsupported/stdtools/y2k/
> 
> This directory contains two small tests for the data conversion functions,
> getdate() and strptime(). Getdate() seems to not be supported in FreeBSD
> at all, so it's not a Y2K issue although probably a POSIX conformance
> issue. But strptime() fails. It is supposed to understand the 2-digit
> year from 0 to 38 as years 2000 to 2038.

Sez who?  strptime behaves exactly as the man page says:

     %G    is replaced by a year as a decimal number with century.  This year
           is the one that contains the greater part of the week (Monday as
           the first day of the week).

     %g    is replaced by the same year as in ``%G'', but as a decimal number
           without century (00-99).

[...]

     %Y    is replaced by the year with century as a decimal number.

     %y    is replaced by the year without century as a decimal number
           (00-99).

I don't see what could be much more explicit than that.

-- 
       "Where am I, and what am I doing in this handbasket?"

Wes Peters                                                 Softweyr LLC
http://www.softweyr.com/~softweyr                      wes@softweyr.com


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?37031575.F7A2399D>