From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: ken Newsgroups: gmane.emacs.help Subject: Re: problem with time-stamps on GNU/Linux and Windows Date: Thu, 04 Sep 2008 15:04:54 -0400 Message-ID: <48C03156.2020908@mousecar.com> References: <48C01A64.9060705@mousecar.com> <87hc8vpxjt.fsf@poczta.po.opole.pl> Reply-To: gebser@mousecar.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1220555165 26600 80.91.229.12 (4 Sep 2008 19:06:05 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 4 Sep 2008 19:06:05 +0000 (UTC) Cc: Seweryn Kokot To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Sep 04 21:07:00 2008 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KbKA9-000576-At for geh-help-gnu-emacs@m.gmane.org; Thu, 04 Sep 2008 21:06:37 +0200 Original-Received: from localhost ([127.0.0.1]:59548 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KbK99-0002AA-QU for geh-help-gnu-emacs@m.gmane.org; Thu, 04 Sep 2008 15:05:35 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KbK8k-00029W-I7 for help-gnu-emacs@gnu.org; Thu, 04 Sep 2008 15:05:10 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KbK8i-00028i-T3 for help-gnu-emacs@gnu.org; Thu, 04 Sep 2008 15:05:10 -0400 Original-Received: from [199.232.76.173] (port=44325 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KbK8i-00028d-Ow for help-gnu-emacs@gnu.org; Thu, 04 Sep 2008 15:05:08 -0400 Original-Received: from mout.perfora.net ([74.208.4.195]:57065) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KbK8i-00072b-9J for help-gnu-emacs@gnu.org; Thu, 04 Sep 2008 15:05:08 -0400 Original-Received: from [192.168.0.26] (dsl093-011-017.cle1.dsl.speakeasy.net [66.93.11.17]) by mrelay.perfora.net (node=mrus1) with ESMTP (Nemesis) id 0MKpCa-1KbK8e1D3s-0005TD; Thu, 04 Sep 2008 15:05:07 -0400 User-Agent: Thunderbird 2.0.0.0 (X11/20070326) In-Reply-To: <87hc8vpxjt.fsf@poczta.po.opole.pl> X-Enigmail-Version: 0.95.7 OpenPGP: id=5AD091E7 X-Provags-ID: V01U2FsdGVkX1+lu/2+gRIj/O8/CMiYFyzRiy+Oj7UkLXIqv4k CIcV9lTgIBGoVhZhhDyfkjjiQTH0Q3zLmN60W2BTjxKFj89OWs LxRyTzPBQcYr/VgDZTyBiOAj5lDdnmV X-detected-kernel: by monty-python.gnu.org: Linux 2.6? (barebone, rare!) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:57277 Archived-At: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 09/04/2008 02:37 PM Seweryn Kokot wrote: > Eli Zaretskii writes: > >>>>> Could you explain to me why I get slightly different time-stamps under >>>>> Windows and Linux? >>>> These localized weekday names come from the system. No amount of >>>> configuration within Emacs will make them the same in Windows as they >>>> are in GNU/Linux. >>> I'm not quite understanding your problem. And I don't often use >>> Windows. But I would think that emacs should fetch the same couple >>> words (i.e., two bytes) representing the time regardless of which OS it >>> is running on. >> The problem is not the time, but the abbreviated name of the second >> day of the week ("Tue" in English). These abbreviated names come from >> a call to a library function, which are different on Windows and on >> GNU/Linux, so they return different strings. >> >>> But I'm guessing that the problem isn't the accuracy of >>> the time, but rather the human-readable output derived from those words. >> Emacs does not derive the names from those words, it simply returns >> whatever the library functions hand it. > > Well, (current-time-string) function returns the same strings on both systems, > but in English, for example: "Thu Sep 4 20:16:51 2008". BTW why this > function gives abbreviations in English and not the locale's ones? > > Whereas this function > > (defun my-insert-time-stamp () > (interactive) > (insert (format-time-string "%a %b %d %02H:%02M:%02S %Y"))) > > on Windows gives > (my-insert-time-stamp) > Cz wrz 04 20:13:20 2008 > > and on GNU/Linux: > czw wrz 04 20:16:29 2008 > > I raise this problem because org-mode has some problems parsing these > inconsistent abbreviations. > > Is it possible to get the result of (my-insert-time-stamp) in English > like in the case of the (current-time-string) function? > > regards, > Seweryn All I can say is that we're working with open source code. It took a little bit of time, but I just tracked down at least one place where the dayname strings are defined. On my system it's (defvar calendar-day-name-array ["Sunday" "Monday" "Tuesday" "Wednesday" "Thursday" "Friday" "Saturday"] "Array of capitalized strings giving, in order, the day names.") (and apparently other places) in calendar.el. I.e., just go in and change the names of the days to what you want. Tell us if that does it... I'd be interested. hth, ken -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (GNU/Linux) iD8DBQFIwDFW8CeNiFrQkecRAu+hAJ9H0pbac0fQI3/hxuBgZBbEQfDiNQCfabfj FSODnxVVIKKRKMaWvHTIcn8= =ymLD -----END PGP SIGNATURE-----