From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kyle Meyer Subject: Re: 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 13:52:28 -0400 Message-ID: <87fv14m7mr.fsf@kyleam.com> References: <87twpkuqaa.fsf@gkayaalp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:42939) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZoxYy-0004WS-R1 for emacs-orgmode@gnu.org; Wed, 21 Oct 2015 13:52:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZoxYt-0005XK-SA for emacs-orgmode@gnu.org; Wed, 21 Oct 2015 13:52:36 -0400 Received: from mail-qg0-f49.google.com ([209.85.192.49]:36114) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZoxYt-0005XG-Nm for emacs-orgmode@gnu.org; Wed, 21 Oct 2015 13:52:31 -0400 Received: by qgad10 with SMTP id d10so34157771qga.3 for ; Wed, 21 Oct 2015 10:52:31 -0700 (PDT) In-Reply-To: <87twpkuqaa.fsf@gkayaalp.com> (=?utf-8?B?IkfDtmt0dcSf?= Kayaalp"'s message of "Wed, 21 Oct 2015 19:42:21 +0300") 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: =?utf-8?B?R8O2a3R1xJ8=?= Kayaalp Cc: emacs-orgmode@gnu.org G=C3=B6ktu=C4=9F Kayaalp writes: > 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 think this is because org-timestamp-format works with timestamp objects, as returned by org-element-context, rather than strings. --=20 Kyle