From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.bugs Subject: bug#39248: format-time-string ignores user's preferred locale Date: Thu, 23 Jan 2020 00:38:38 -0800 Organization: UCLA Computer Science Department Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="42820"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 Cc: 39248@debbugs.gnu.org To: "Paul W. Rankin" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jan 23 09:39:12 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1iuY1A-000B7R-9w for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 23 Jan 2020 09:39:12 +0100 Original-Received: from localhost ([::1]:53366 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iuY19-0003UH-Dx for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 23 Jan 2020 03:39:11 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34579) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iuY11-0003R1-25 for bug-gnu-emacs@gnu.org; Thu, 23 Jan 2020 03:39:03 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iuY10-0007Wj-2H for bug-gnu-emacs@gnu.org; Thu, 23 Jan 2020 03:39:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:45817) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iuY0z-0007Wc-UZ for bug-gnu-emacs@gnu.org; Thu, 23 Jan 2020 03:39:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iuY0z-0004Xn-SV for bug-gnu-emacs@gnu.org; Thu, 23 Jan 2020 03:39:01 -0500 X-Loop: help-debbugs@gnu.org In-Reply-To: Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 23 Jan 2020 08:39:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39248 X-GNU-PR-Package: emacs Original-Received: via spool by 39248-submit@debbugs.gnu.org id=B39248.157976873117447 (code B ref 39248); Thu, 23 Jan 2020 08:39:01 +0000 Original-Received: (at 39248) by debbugs.gnu.org; 23 Jan 2020 08:38:51 +0000 Original-Received: from localhost ([127.0.0.1]:51790 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iuY0p-0004XL-4U for submit@debbugs.gnu.org; Thu, 23 Jan 2020 03:38:51 -0500 Original-Received: from zimbra.cs.ucla.edu ([131.179.128.68]:58032) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iuY0n-0004X7-6c for 39248@debbugs.gnu.org; Thu, 23 Jan 2020 03:38:50 -0500 Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id D518E16006A; Thu, 23 Jan 2020 00:38:42 -0800 (PST) Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id aM-bAPxBRzcJ; Thu, 23 Jan 2020 00:38:42 -0800 (PST) Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 2F33D160081; Thu, 23 Jan 2020 00:38:42 -0800 (PST) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id rRvkd9Bz3nCe; Thu, 23 Jan 2020 00:38:42 -0800 (PST) Original-Received: from [192.168.1.9] (cpe-23-242-74-103.socal.res.rr.com [23.242.74.103]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id E5FE416006A; Thu, 23 Jan 2020 00:38:41 -0800 (PST) Content-Language: en-US X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:175136 Archived-At: Thanks for the bug report. I don't observe the problem on GNU/Linux; for example, the following shell command: LC_ALL=en_AU.utf8 emacs -Q -batch -eval '(message "%s" (format-time-string "%x"))' outputs "23/01/20", which is the same thing that the shell command "LC_ALL=en_AU.utf8 date +%x" outputs. I don't have easy access to macOS so I'll need your help to debug this. I suggest that you build Emacs with debug symbols and with optimization off (e.g., "make clean; make CFLAGS='-g3 -O0'"), and then run it under a debugger, and plant a breakpoint on the nstrftime function and then single-step and see what goes wrong. Something like this: $ make clean $ make CFLAGS='-g3 -O0' $ gdb src/emacs (gdb) b nstrftime (gdb) r -Q -batch -eval '(message "%s" (format-time-string "%x"))' (gdb) n (gdb) n ... This will help us see whether the bug is in Emacs or in the underlying strftime function.