On 06/24/2011 01:52 PM, Eric Blake wrote:
> %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.

That said, you found a bug in POSIX.  %C can be larger than 99, since it
maps to the same construct in strftime().

http://austingroupbugs.net/view.php?id=466

-- 
Eric Blake   ebl...@redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to