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

From: [email-masked] (GNU bug Tracking System)
Date: Wed, 06 Nov 2013 10:17:03 +0000

Your bug report

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

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
15816: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=15816
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#15816: 24.3; (format-time-string "%h") returns "" instead of month
From: Eli Zaretskii <[email-masked]>
To: [email-masked]
Cc: [email-masked]
Date: Wed, 06 Nov 2013 12:16:00 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

> From: [email-masked]
> Date: Wed, 06 Nov 2013 01:05:45 +0100
> 
>   when I execute 
> 
> (format-time-string "%h")
> 
> I get a return value of "" instead of "nov" meaning
> November, the current date month. On the contrary,
> execution of
> 
> (format-time-string "%b")
> 
> 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.

>   If it affects other users too, my suggestion is to
> simply add a note in the docstring of format-time-string,
> saying that modifier "%h" requires a C99-compliant
> runtime. 

Done.

Subject: 24.3; (format-time-string "%h") returns "" instead of month
From: [email-masked]
To: [email-masked]
Date: Wed, 06 Nov 2013 01:05:45 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

Hello,

  when I execute 

(format-time-string "%h")

I get a return value of "" instead of "nov" meaning
November, the current date month. On the contrary,
execution of

(format-time-string "%b")

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".

  My conjecture came after reading of this page:
http://www.cplusplus.com/reference/ctime/strftime/ .

  I kindly ask if someone good-willed Emacs user
might see if the problem happens on his/her
Windows machine. A test on Linux could be also
a useful counterexample.

  If it affects other users too, my suggestion is to
simply add a note in the docstring of format-time-string,
saying that modifier "%h" requires a C99-compliant
runtime. 

  Thanks for your attention, kindest regards.

  Andrea

In GNU Emacs 24.3.1 (i386-mingw-nt6.1.7600)
 of 2013-03-17 on MARVIN
Windowing system distributor `Microsoft Corp.', version 6.1.7600
Configured using:
 `configure --with-gcc (4.7) --cflags
 -ID:/devel/emacs/libs/libXpm-3.5.8/include
 -ID:/devel/emacs/libs/libXpm-3.5.8/src
 -ID:/devel/emacs/libs/libpng-dev_1.4.3-1/include
 -ID:/devel/emacs/libs/zlib-dev_1.2.5-2/include
 -ID:/devel/emacs/libs/giflib-4.1.4-1/include
 -ID:/devel/emacs/libs/jpeg-6b-4/include
 -ID:/devel/emacs/libs/tiff-3.8.2-1/include
 -ID:/devel/emacs/libs/gnutls-3.0.9/include
 -ID:/devel/emacs/libs/libiconv-1.13.1-1-dev/include
 -ID:/devel/emacs/libs/libxml2-2.7.8/include/libxml2'

Important settings:
  value of $LANG: ITA
  locale-coding-system: cp1252
  default enable-multibyte-characters: t

Major mode: Lisp Interaction

Minor modes in effect:
  tooltip-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
w h e n SPC e x e c u t i n g SPC w i t h SPC C - j 
SPC I SPC g e t SPC " " SPC i n s t e a d SPC o f SPC 
" n o v " : <return> <return> ( f o r m a t - t i m 
e - s t r i n g SPC " % h " ) C-j <return> <return> 
<return> " % b " SPC w o r k s SPC f o r SPC m e : 
<return> <return> ( f o r m a t - t i m e - s t r i 
n g SPC " % b " ) C-j O K : SPC I SPC g o t SPC " n 
o v " SPC a s SPC r e s u l t <return> <return> M-x 
r e p o r <tab> <return>

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
scroll-up-command: End of buffer

Load-path shadows:
None found.

Features:
(shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 mml
easymenu mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231
mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums
mm-util mail-prsvr mail-utils time-date tooltip ediff-hook vc-hooks
lisp-float-type mwheel dos-w32 ls-lisp w32-common-fns disp-table w32-win
w32-vars tool-bar dnd fontset image regexp-opt fringe tabulated-list
newcomment lisp-mode register page menu-bar rfn-eshadow timer select
scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham
georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese hebrew greek romanian slovak czech european ethiopic
indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple
abbrev minibuffer loaddefs button faces cus-face macroexp files
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote make-network-process
w32 multi-tty emacs)