This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: warning: `%y' yields only last 2 digits of year
- From: Andreas Schwab <schwab at suse dot de>
- To: dewar at gnat dot com (Robert Dewar)
- Cc: clock at atrey dot karlin dot mff dot cuni dot cz, fw at deneb dot enyo dot de, gcc at gcc dot gnu dot org
- Date: Wed, 13 Mar 2002 10:29:48 +0100
- Subject: Re: warning: `%y' yields only last 2 digits of year
- References: <20020313060621.4751DF2E31@nile.gnat.com>
dewar@gnat.com (Robert Dewar) writes:
|> <<Hm, it probably should be modified to check if "%y" is preceded by
|> "19", which would be clearly a bug.
|> >>
|>
|> Well I would not say that is a bug, for example if you are using sliding
|> windows for handling Y2K, it is perfectly reasonable that in one branch
|> you have 19%y and in the other 20%y.
Which is still wrong since years can span more than just 1900 - 2099.
What's wrong with using %Y in the first place?
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE GmbH, Deutschherrnstr. 15-19, D-90429 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."