Subject: bug#15816: 24.3; (format-time-string "%h") returns "" instead of month

From: Rüdiger Sonderfeld <[email-masked]>
Date: Wed, 06 Nov 2013 14:31:04 +0100

On Wednesday 06 November 2013 12:16:00 Eli Zaretskii wrote:
> > From: [email-masked]
> > Date: Wed, 06 Nov 2013 01:05:45 +0100

> > correctly returns "nov". I suppose this is
> > due to the runtime of my Windows installation
> > (an ordinary Windows 7 64-bit) not supporting
> > C99 format modifiers of the C function "strftime".
> 
> Indeed, Windows version of strftime doesn't support %h.

I just compared the docstring to the manpage of strftime on GNU/Linux and the 
following symbols are not  ANSI C

- %C is SU
- %G,%g are TZ
- %h is SU (%b)
- %e is SU (%d with blanks)
- %u is SU
- %V is SU
- %k is TZ (%H with blanks)
- %l is TZ (%I with blanks)
- %N not in manpage or glibc manual
- %z is SU
- %s is TZ
- %D is SU ("%m/%d/%y", should not be used)
- %T is SU ("%H:%M:%S")
- %R is SU ("%H:%M")
- %r is SU ("%I:%M:%S %p")
- %t is SU (\t)
- %n is SU (\n)

(SU :: Single UNIX Specification and TZ :: Olson's timezone package)

Maybe we should not mention %h, %D, %T, %R, %r, %t, %n at all because these 
can be replaced by the portable alternatives mentioned.  The rest might be a 
bit tricky to replace.  Could you try which of them work on Windows at all?  
(Sorry I don't have a current Windows Emacs available.)

There are also %F in C99 (ISO 8601 date format) and %P (GNU extension, am/pm), 
which are not mentioned in the docstring right now.

Regards,
Rüdiger