[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: master da4e5f6: Simplify use of timestamps
From: |
Glenn Morris |
Subject: |
Re: master da4e5f6: Simplify use of timestamps |
Date: |
Sat, 15 Sep 2018 12:46:17 -0400 |
User-agent: |
Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) |
Paul Eggert wrote:
> branch: master
> commit da4e5f668582e1f047b6bd5259a1a4f92b5461b6
[...]
> --- a/lisp/calendar/icalendar.el
> +++ b/lisp/calendar/icalendar.el
> @@ -1016,9 +1016,7 @@ current iCalendar object, as a string. Increase
> (setq icalendar--uid-count (1+ icalendar--uid-count))
> (setq uid (replace-regexp-in-string
> "%t"
> - (format "%d%d%d" (car (current-time))
> - (cadr (current-time))
> - (car (cddr (current-time))))
> + (format-time-string "%s%N")
> uid t t))
This causes test icalendar--create-uid to fail.
(BTW, make -j8 check takes 22 seconds here, so not a big burden to run
after making a change.)
> --- a/lisp/gnus/nnmaildir.el
> +++ b/lisp/gnus/nnmaildir.el
> @@ -764,7 +764,7 @@ This variable is set by `nnmaildir-request-article'.")
>
> (defun nnmaildir--scan (gname scan-msgs groups _method srv-dir srv-ls)
> (catch 'return
> - (let ((36h-ago (- (car (current-time)) 2))
> + (let ((36h-ago (- (float-time) 129600))
> absdir nndir tdir ndir cdir nattr cattr isnew pgname read-only ls
> files num dir flist group x)
> (setq absdir (nnmaildir--srvgrp-dir srv-dir gname)
> @@ -801,7 +801,7 @@ This variable is set by `nnmaildir-request-article'.")
> (throw 'return nil))
> (dolist (file (funcall ls tdir 'full "\\`[^.]" 'nosort))
> (setq x (file-attributes file))
> - (if (or (> (cadr x) 1) (< (car (nth 4 x)) 36h-ago))
> + (if (or (> (cadr x) 1) (time-less-p (nth 4 x) 36h-ago))
> (delete-file file))))
> (or scan-msgs
> isnew
> @@ -1463,9 +1463,7 @@ This variable is set by `nnmaildir-request-article'.")
> (unless (string-equal nnmaildir--delivery-time file)
> (setq nnmaildir--delivery-time file
> nnmaildir--delivery-count 0))
> - (when (and (consp (cdr time))
> - (consp (cddr time)))
> - (setq file (concat file "M" (number-to-string (caddr time)))))
> + (setq file (concat file (format-time-string "M%6N" time)))
> (setq file (concat file nnmaildir--delivery-pid)
> file (concat file "Q" (number-to-string nnmaildir--delivery-count))
> file (concat file "." (nnmaildir--system-name))
I haven't looked at this in any detail, so this comment could be
rubbish, but if this causes a change in the on-disk file names Gnus uses
for maildir, that could be bad, no? (Eg running a Gnus-with-new-maildir
on a pre-existing maildir store might not find the same files as
Gnus-with-old-maildir.)
- Re: master da4e5f6: Simplify use of timestamps,
Glenn Morris <=