From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Bostjan Vilfan Newsgroups: gmane.emacs.bugs Subject: bug#13982: 24.2; Bug in function format-time-string when used under Windows Date: Sat, 16 Mar 2013 10:51:18 +0200 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1363490073 28939 80.91.229.3 (17 Mar 2013 03:14:33 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 17 Mar 2013 03:14:33 +0000 (UTC) To: 13982@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Mar 17 04:14:57 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UH43i-0005eJ-Qs for geb-bug-gnu-emacs@m.gmane.org; Sun, 17 Mar 2013 04:14:55 +0100 Original-Received: from localhost ([::1]:41800 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UH43M-0005ii-0B for geb-bug-gnu-emacs@m.gmane.org; Sat, 16 Mar 2013 23:14:32 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:34408) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UH43F-0005i5-7y for bug-gnu-emacs@gnu.org; Sat, 16 Mar 2013 23:14:29 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UH43A-0002nk-8M for bug-gnu-emacs@gnu.org; Sat, 16 Mar 2013 23:14:25 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:54136) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UH2CH-0001Bw-Mt for bug-gnu-emacs@gnu.org; Sat, 16 Mar 2013 21:15:37 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1UH2De-0006bo-BT for bug-gnu-emacs@gnu.org; Sat, 16 Mar 2013 21:17:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Bostjan Vilfan Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 17 Mar 2013 01:17:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 13982 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.136348297425314 (code B ref -1); Sun, 17 Mar 2013 01:17:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 17 Mar 2013 01:16:14 +0000 Original-Received: from localhost ([127.0.0.1]:58243 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UH2Cq-0006aC-9b for submit@debbugs.gnu.org; Sat, 16 Mar 2013 21:16:13 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:53626) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UGmrJ-0007wA-C4 for submit@debbugs.gnu.org; Sat, 16 Mar 2013 04:52:59 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UGmpq-0003VR-Nr for submit@debbugs.gnu.org; Sat, 16 Mar 2013 04:51:30 -0400 Original-Received: from lists.gnu.org ([208.118.235.17]:33931) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UGmpq-0003VN-L8 for submit@debbugs.gnu.org; Sat, 16 Mar 2013 04:51:26 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:36743) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UGmpn-0002jm-Fl for bug-gnu-emacs@gnu.org; Sat, 16 Mar 2013 04:51:26 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UGmpk-0003UU-4I for bug-gnu-emacs@gnu.org; Sat, 16 Mar 2013 04:51:23 -0400 Original-Received: from mail-vc0-f175.google.com ([209.85.220.175]:34016) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UGmpj-0003UO-UJ for bug-gnu-emacs@gnu.org; Sat, 16 Mar 2013 04:51:20 -0400 Original-Received: by mail-vc0-f175.google.com with SMTP id hf12so1835812vcb.34 for ; Sat, 16 Mar 2013 01:51:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:date:message-id:subject:from:to :content-type; bh=FQ47SidQBKf9zIJD1T7g08DbgHySyIkEEf8BvpSBHWw=; b=ykFfiw/fOG+I7DJEN990ra9mWmAeqrjkyfp3YNADKOxV+wZDelZdLrIgBvENh5iy0h 7svseMwDYxRcbMuWr4vPsQQYagjQGpZBHeQhm3Sj6yGrlozQC8M5wdL0XCFg656NViE/ XjOKRaVCE20vFoalSniz4PAnDdWniTLD9sB/P2IeZlkIqWjOJLA0A7NNKnsLjyBYzxS5 WXUzwbW7JBXb90HZWRKH9WzgYrJdDO3OQumzQ33dJTDa/EtVtLVFz7LWKFw53nPDQcVC gSuGwo66sU+2GatiP4fEiAQR8/NXplNDsaV2OoesvrkT0pODQv8w/Pk2PGlo5jHUkncT nDiQ== X-Received: by 10.58.90.5 with SMTP id bs5mr1119017veb.60.1363423879202; Sat, 16 Mar 2013 01:51:19 -0700 (PDT) Original-Received: by 10.52.91.42 with HTTP; Sat, 16 Mar 2013 01:51:18 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Mailman-Approved-At: Sat, 16 Mar 2013 21:16:10 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 140.186.70.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.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:72611 Archived-At: --text follows this line-- This bug report will be sent to the Bug-GNU-Emacs mailing list and the GNU bug tracker at debbugs.gnu.org. Please check that the From: line contains a valid email address. After a delay of up to one day, you should receive an acknowledgement at that address. Please write in English if possible, as the Emacs maintainers usually do not have translators for other languages. Please describe exactly what actions triggered the bug, and the precise symptoms of the bug. If you can, give a recipe starting from `emacs -Q': evaluate the form (format-time-string "%H:%M ") DETAILS: The behavior of Emacs with regard to daylight savings is covered in section 31.13 of the manual. Briefly, the two most important variables are calendar-daylight-savings-starts and calendar-daylight-savings-ends, which are defined in cal-dst. If these variables are nil (or undefined, when cal-dst is not loaded), daylight savings is not used; otherwise, they define the start and end of daylight savings time. The default value for the two variables corresponds to daylight savings in Cambridge, Massachusetts. When the function format-time-string is tested under Linux after calling, e.g., "emacs -Q" by evaluating the form "(format-time-string \"%H:%M\")" one gets the expected answer, i.e., the current local time since the two above mentioned variables are undefined. However, when the same is performed under Windows, Emacs uses daylight savings with start and end corresponding to Cambridge, Massachusetts, in spite of the fact that the two previously mentioned variables are undefined. In my case I evaluated the above form at 9:47 AM local time but received the output 10:47, presumably because daylight savings time is already in force in Cambridge, Massachusetts, although not in the Central European Time area. Yet that is not all. (We are still refering to an installation of Emacs under Windows.) If one creates a small init.el file with the following contents: START OF FILE (load "cal-dst") (setq calendar-daylight-savings-starts '(calendar-nth-named-day -1 0 3 year)) ;(setq calendar-daylight-savings-starts nil) (setq calendar-daylight-savings-ends '(calendar-nth-named-day -1 0 10 year)) ;(setq calendar-daylight-savings-ends nil) (setq calendar-daylight-time-offset 60) (setq calendar-daylight-savings-starts-time 180) (setq calendar-daylight-savings-ends-time 180) END OF FILE and invokes emacs with "runemacs --no-splash --no-site-file" (in that case the init.el will be executed), after which one evaluates the same form as before, one still gets the Cambridge, Massachusetts version of daylight savings. In other words, the two above mentioned variables have no effect. In GNU Emacs 24.2.1 (i386-mingw-nt6.1.7601) of 2012-08-29 on MARVIN Windowing system distributor `Microsoft Corp.', version 6.1.7601 Configured using: `configure --with-gcc (4.6) --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' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: ENU value of $XMODIFIERS: nil locale-coding-system: cp1252 default enable-multibyte-characters: t Major mode: Info Minor modes in effect: server-mode: t show-paren-mode: t delete-selection-mode: t 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: SPC SPC SPC SPC ( ( W r SPC e SPC a r e SPC s t i l l SPC r e f e r i n g SPC t o SPC a n SPC i n s t a l l a t i o n SPC o f SPC E m a c s SPC u n d e r SPC W i n d o w s . ) SPC C-s b u g C-s M-x r e p o r t - e m a c s - b u g Recent messages: Saving file m:/orgmode/notes.org... Wrote m:/orgmode/notes.org org-agenda-error: Command not allowed in this line create calendar tool bar item GNU Emacs 24.2.1 (i386-mingw-nt6.1.7601) of 2012-08-29 on MARVIN Connection file "c:/Users/Bostjan/Documents/.emacs.d/server/server" deleted Server mode enabled Saving file c:/Users/Bostjan/Documents/.emacs.d/daylight-savings-message.txt... Wrote c:/Users/Bostjan/Documents/.emacs.d/daylight-savings-message.txt Mark saved where search started Load-path shadows: c:/Program Files (x86)/GNU/Emacs/org-7.9.2/contrib/lisp/htmlize hides c:/PROGRAM FILES (X86)/GNU/EMACS/EMACS24.2M/site-lisp/htmlize Features: (shadow sort mail-extr emacsbug message rfc822 mml 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 misearch multi-isearch info cus-start cus-load org-colview htmlize-view w32-winprint htmlize cl holidays hol-loaddefs diary-lib diary-loaddefs cal-iso mule-util cal-move org-wl org-w3m org-vm org-rmail org-mhe org-mew org-irc org-jsinfo org-infojs org-html org-exp ob-exp org-exp-blocks org-agenda org-info org-gnus gnus-util org-docview org-bibtex bibtex org-bbdb org byte-opt bytecomp byte-compile cconv macroexp advice help-fns advice-preload ob-tangle ob-ref ob-lob ob-table org-footnote org-src ob-comint ob-keys org-pcomplete pcomplete comint ansi-color ring org-list org-faces org-entities noutline outline easy-mmode org-version ob-emacs-lisp ob org-compat org-macs ob-eval format-spec find-func warnings server org-install cal-dst regexp-opt cal-menu easymenu calendar cal-loaddefs paren delsel time-date tooltip ediff-hook vc-hooks lisp-float-type mwheel dos-w32 disp-table ls-lisp w32-win w32-vars tool-bar dnd fontset image fringe 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 files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process multi-tty emacs)