GNU bug report logs - #21229
24.5; parse-time-string ignore PM/AM

Previous Next

Package: emacs;

Reported by: Tino Calancha <f92capac <at> gmail.com>

Date: Mon, 10 Aug 2015 15:35:02 UTC

Severity: minor

Tags: notabug

Found in version 24.5

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Tino Calancha <f92capac <at> gmail.com>
Cc: f92capac <at> gmail.com, 21229 <at> debbugs.gnu.org
Subject: bug#21229: 24.5; parse-time-string ignore PM/AM
Date: Mon, 10 Aug 2015 20:46:30 +0300
> Date: Tue, 11 Aug 2015 02:35:52 +0900 (JST)
> From: Tino Calancha <f92capac <at> gmail.com>
> cc: Tino Calancha <f92capac <at> gmail.com>, 21229 <at> debbugs.gnu.org
> 
> 
> |#> emacs -Q
> 
> 
> (parse-time-string "Mon 10 Aug 2015 03:11:35 PM JST")
> (35 11 3 10 8 2015 1 nil nil)
>   (parse-time-string "Mon 10 Aug 2015 03:11:35 AM JST")
> (35 11 3 10 8 2015 1 nil nil)

So, as you see, the problem is in parse-time-string.  I'm not even
sure that function is supposed to be able to parse the output of %c,
since on my system that produces an obviously bogus result:

 (format-time-string "%c" (current-time)) => "8/10/2015 8:41:41 PM"

but

 (parse-time-string "8/10/2015 8:41:41 PM") => (41 41 8 8 nil 2010 nil nil nil)

Look, ma: no month! and the year is off!

However,

 (current-time-string) => "Mon Aug 10 20:44:52 2015"

and

 (parse-time-string "Mon Aug 10 20:44:52 2015") => (52 44 20 10 8 2015 1 nil nil)

as expected.




This bug report was last modified 4 years and 276 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.