all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#40861: 26.3; parse-time-string does not intepret times
@ 2020-04-26  7:59 rjhwelsh+emacs
  2020-04-26 14:05 ` Eli Zaretskii
  0 siblings, 1 reply; 3+ messages in thread
From: rjhwelsh+emacs @ 2020-04-26  7:59 UTC (permalink / raw)
  To: 40861

Hi,

I have noticed that (parse-time-string s) is not working properly for
time strings, INCLUDING provided examples in the manual.

I first noticed it on org-mode; and tested it with (org-read-date) which
uses (parse-time-string) to interpret times.

I suspect there is some bug in =parse-time-rules=.
Scratch buffer to replicate the issue is provided below.

Kind regards,
Roger

;; *scratch*
;; org.el
(require 'org)
org

(org-read-date nil nil "14:00")
"2020-04-26"

;; parse-time.el
(parse-time-string "14:00")
(nil nil nil nil nil nil nil nil nil)

;; Provided examples from the manual
(parse-time-string "Fri, 25 Mar 2016 16:24:56 +0100")
(nil nil nil 25 3 2016 5 nil nil)

(parse-time-string "1998-09-12T12:21:54-0200")
(nil nil nil nil nil nil nil nil nil)

parse-time-rules


In GNU Emacs 26.3 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.13)
 of 2020-03-21 built on ponos
Windowing system distributor 'The X.Org Foundation', version 11.0.12007000
Recent messages:
compiling byte-compile-out-toplevel...done
compiling byte-compile-constant...done
compiling byte-compile-variable-ref...done
compiling byte-optimize-form...done
compiling byte-optimize-body...done
compiling byte-optimize-predicate...done
compiling byte-optimize-binary-predicate...done
compiling byte-optimize-form-code-walker...done
compiling byte-optimize-lapcode...done
../../../../../usr/share/emacs/26.3/lisp/emacs-lisp/eieio.el: ‘object-print’ is an obsolete generic function (as of 26.1); use ‘cl-print-object’ instead.

Configured using:
 'configure --prefix=/usr --build=x86_64-pc-linux-gnu
 --host=x86_64-pc-linux-gnu --mandir=/usr/share/man
 --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc
 --localstatedir=/var/lib --disable-silent-rules
 --docdir=/usr/share/doc/emacs-26.3-r1
 --htmldir=/usr/share/doc/emacs-26.3-r1/html --libdir=/usr/lib64
 --program-suffix=-emacs-26 --includedir=/usr/include/emacs-26
 --infodir=/usr/share/info/emacs-26 --localstatedir=/var
 --enable-locallisppath=/etc/emacs:/usr/share/emacs/site-lisp
 --without-compress-install --without-hesiod --without-pop
 --with-file-notification=inotify --enable-acl --with-dbus
 --without-modules --without-gameuser --with-gpm --without-kerberos
 --without-kerberos5 --with-lcms2 --with-xml2 --without-mailutils
 --without-selinux --with-gnutls --without-libsystemd --with-threads
 --without-wide-int --with-zlib --with-sound=alsa --with-x --without-ns
 --without-gconf --without-gsettings --without-toolkit-scroll-bars
 --with-gif --with-jpeg --with-png --with-rsvg --with-tiff --with-xpm
 --without-imagemagick --with-xft --without-cairo --without-libotf
 --without-m17n-flt --with-x-toolkit=gtk3 --without-xwidgets
 'CFLAGS=-march=ivybridge -O2' CPPFLAGS= 'LDFLAGS=-Wl,-O1
 -Wl,--as-needed''

Configured features:
XPM JPEG TIFF GIF PNG RSVG SOUND GPM DBUS GLIB NOTIFY ACL GNUTLS LIBXML2
FREETYPE XFT ZLIB GTK3 X11 XDBE XIM THREADS LCMS2

Important settings:
  value of $LC_CTYPE: en_NZ.utf8
  value of $LANG: en_NZ.utf8
  value of $XMODIFIERS: @im=ibus
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  electric-indent-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

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message rmc puny seq dired desktop
frameset edmacro kmacro dired-loaddefs format-spec rfc822 mml url
url-proxy url-privacy url-expand url-methods url-history url-cookie
url-domsuf url-util url-parse auth-source eieio byte-opt subr-x bytecomp
byte-compile cconv eieio-core eieio-loaddefs url-vars mm-view mml-smime
smime dig mailcap mml-sec password-cache epa wid-edit epg cl-extra
help-mode easymenu epg-config mm-decode mm-bodies mm-encode mail-parse
rfc2231 mailabbrev nnheader gnus-util rmail dframe rmail-loaddefs
gmm-utils mailheader sendmail derived rfc2047 rfc2045 ietf-drums mm-util
mail-prsvr cl mail-utils parse-time elec-pair cl-seq easy-mmode cl-macs
inline cl-loaddefs cl-lib time-date mule-util gv pcase tooltip eldoc
electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win
x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe
tabulated-list replace newcomment text-mode elisp-mode lisp-mode
prog-mode register page menu-bar rfn-eshadow isearch timer select
scroll-bar mouse jit-lock font-lock syntax facemenu font-core
term/tty-colors frame cl-generic cham georgian utf-8-lang misc-lang
vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932
hebrew greek romanian slovak czech european ethiopic indian cyrillic
chinese composite charscript charprop case-table epa-hook jka-cmpr-hook
help simple abbrev obarray minibuffer cl-preloaded nadvice loaddefs
button faces cus-face macroexp files text-properties overlay sha1 md5
base64 format env code-pages mule custom widget hashtable-print-readable
backquote threads dbusbind inotify lcms2 dynamic-setting
font-render-setting move-toolbar gtk x-toolkit x multi-tty
make-network-process emacs)

Memory information:
((conses 16 390750 33640)
 (symbols 48 25725 0)
 (miscs 40 42 139)
 (strings 32 36675 1238)
 (string-bytes 1 1177936)
 (vectors 16 9843)
 (vector-slots 8 473886 20554)
 (floats 8 64 74)
 (intervals 56 292 0)
 (buffers 992 11))





^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#40861: 26.3; parse-time-string does not intepret times
  2020-04-26  7:59 bug#40861: 26.3; parse-time-string does not intepret times rjhwelsh+emacs
@ 2020-04-26 14:05 ` Eli Zaretskii
  2020-04-27  7:01   ` Stefan Kangas
  0 siblings, 1 reply; 3+ messages in thread
From: Eli Zaretskii @ 2020-04-26 14:05 UTC (permalink / raw)
  To: rjhwelsh+emacs; +Cc: 40861

> From: rjhwelsh+emacs@posteo.net
> Date: Sun, 26 Apr 2020 19:59:07 +1200
> 
> ;; parse-time.el
> (parse-time-string "14:00")
> (nil nil nil nil nil nil nil nil nil)

In Emacs 27 this produces

  (0 0 14 nil nil nil nil -1 nil)

which I think is reasonable.

> ;; Provided examples from the manual
> (parse-time-string "Fri, 25 Mar 2016 16:24:56 +0100")
> (nil nil nil 25 3 2016 5 nil nil)

This produces

  (56 24 16 25 3 2016 5 -1 3600)

with Emacs 27.

> (parse-time-string "1998-09-12T12:21:54-0200")
> (nil nil nil nil nil nil nil nil nil)

I get

  (nil nil nil nil nil nil nil -1 nil)

So I think this is already fixed in the development sources, and you
are advised to upgrade to Emacs 27 (its pretest is available from
alpha.gnu.org).

Thanks.





^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#40861: 26.3; parse-time-string does not intepret times
  2020-04-26 14:05 ` Eli Zaretskii
@ 2020-04-27  7:01   ` Stefan Kangas
  0 siblings, 0 replies; 3+ messages in thread
From: Stefan Kangas @ 2020-04-27  7:01 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 40861-done, rjhwelsh+emacs

Eli Zaretskii <eliz@gnu.org> writes:

> So I think this is already fixed in the development sources, and you
> are advised to upgrade to Emacs 27 (its pretest is available from
> alpha.gnu.org).

I'm seeing the same thing as Eli, this seems to be all fixed.  I'm
therefore closing this bug now.

Best regards,
Stefan Kangas





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-04-27  7:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-26  7:59 bug#40861: 26.3; parse-time-string does not intepret times rjhwelsh+emacs
2020-04-26 14:05 ` Eli Zaretskii
2020-04-27  7:01   ` Stefan Kangas

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.