bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#21229: 24.5; parse-time-string ignore PM/AM


From: Eli Zaretskii
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@gmail.com>
> cc: Tino Calancha <f92capac@gmail.com>, 21229@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.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]