GNU bug report logs -
#15816
24.3; (format-time-string "%h") returns "" instead of month
Previous Next
Reported by: andrea.rossetti <at> gmail.com
Date: Wed, 6 Nov 2013 00:07:01 UTC
Severity: minor
Found in version 24.3
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
On Wednesday 06 November 2013 12:16:00 Eli Zaretskii wrote:
> > From: andrea.rossetti <at> gmail.com
> > 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
This bug report was last modified 11 years and 243 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.