Subject: Re: date +%C

From: Eric Blake <[email-masked]>
Date: Fri, 24 Jun 2011 13:52:02 -0600

tag 8930 notabug
thanks

> ~$ *date*
> vendredi 24 juin 2011, 20:32:50 (UTC+0200)
> ~$ *date +%C*
> 20
> 
> 
> *# 21st Century !*
> 

Thanks for the report.  However, this is not a bug.

%C does not mean the century in common parlance, rather, according to
POSIX, it means:

http://pubs.opengroup.org/onlinepubs/9699919799/utilities/date.html

> 
> %C
>     Century (a year divided by 100 and truncated to an integer) as a decimal number [00,99].

Yes, the mnemonic is using century for lack of a better term, but it is
correctly printing all but the last two digits of the year.

-- 
Eric Blake   [email-masked]    +1-801-349-2682
Libvirt virtualization library http://libvirt.org