warning: `%y' yields only last 2 digits of year

Andreas Schwab schwab@suse.de
Wed Mar 13 01:30:00 GMT 2002


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."



More information about the Gcc mailing list