Bug in old-locale?

Ashley Yakeley ashley at semantic.org
Sat Jul 11 03:39:53 EDT 2009

On Sun, 2009-06-28 at 19:46 -0500, Antoine Latter wrote:
> old-time handles the padding by eating it. The attached patch does the
> same for the time package.
> From reading the date(1) manpage, there are some other parts of the
> format-spec not supported. But we at least parse the format-specs we
> ship with.

I have decided to implement the glibc-specific formatting flags,
"_-0^#". Do a "man strftime" on a glibc system to see. I compare with
the system strftime as a test (which won't work on a non-glibc system,
but I think that's OK).

The trouble is that the glibc behaviour of "#" is bizarre. Sometimes it
converts to upper case, sometimes it converts to lower case, and
sometimes it does nothing. Despite what the man page says, it never
"swaps" the case, even for %Z.

I am tempted to have "#" always convert to lower case. This is the most
predictable and useful behaviour.

Ashley Yakeley

More information about the Libraries mailing list