From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?utf-8?Q?G=C3=B6ktu=C4=9F_Kayaalp?= Subject: Bug: `org-timestamp-format' does not return correct time [8.2.10 (8.2.10-41-g42228a-elpa @ /home/gk/.emacs.d/packages/org-20150601/)] Date: Wed, 21 Oct 2015 19:42:21 +0300 Message-ID: <87twpkuqaa.fsf@gkayaalp.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:46220) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZowIf-0003YQ-Ex for emacs-orgmode@gnu.org; Wed, 21 Oct 2015 12:31:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZowIb-0005SW-9i for emacs-orgmode@gnu.org; Wed, 21 Oct 2015 12:31:41 -0400 Received: from out3-smtp.messagingengine.com ([66.111.4.27]:38602) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZowIb-0005SP-3H for emacs-orgmode@gnu.org; Wed, 21 Oct 2015 12:31:37 -0400 Received: from xenophon (unknown [78.180.122.176]) by mail.messagingengine.com (Postfix) with ESMTPA id B580DC00012 for ; Wed, 21 Oct 2015 12:31:34 -0400 (EDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Remember to cover the basics, that is, what you expected to happen and what in fact did happen. You don't know how to make a good report? See http://orgmode.org/manual/Feedback.html#Feedback Your bug report will be posted to the Org-mode mailing list. ------------------------------------------------------------------------ The function `org-timestamp-format' returns bad values: (org-timestamp-format "<2015-10-07 Wed>" "%d %B %Y") "30 November -001" (org-timestamp-format "[2015-10-07 Wed]" "%d %B %Y") "30 November -001" (org-timestamp-format "[2015-10-07]" "%d %B %Y") "30 November -001" (org-timestamp-format "<2015-10-07>" "%d %B %Y") "30 November -001" (org-timestamp-format "2015-10-07" "%d %B %Y") "30 November -001" (org-timestamp-format (current-time) "%d %B %Y") "30 November -001" (org-timestamp-format (org-parse-time-string "[2015-10-07 Wed]") "%d %B %Y") "30 November -001" I tried this for my latex export filter, and got the same output for the timestamp in the second example: (defun gk-ox-latex-format-inactive-timestamp (text backend info) (when (org-export-derived-backend-p backend 'latex) (org-timestamp-format text "%d %B %Y"))) I get the expected result from this piece of code: (format-time-string "%d %B %Y" (apply #'encode-time (org-parse-time-string text))) "07 November 2015" I see two commits that affect this function, visible here: http://orgmode.org/cgit.cgi/org-mode.git/log/?qt=grep&q=org-timestamp-format&showmsg=1 One of them adds it, the other one refactors it, without changing the logic. Emacs : GNU Emacs 24.5.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.16.6) of 2015-09-10 on foutrelis Package: Org-mode version 8.2.10 (8.2.10-41-g42228a-elpa @ /home/gk/.emacs.d/packages/org-20150601/)