From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Glenn Morris Newsgroups: gmane.emacs.devel Subject: Re: master da4e5f6: Simplify use of timestamps Date: Sat, 15 Sep 2018 12:46:17 -0400 Message-ID: References: <20180914003237.10512.3041@vcs0.savannah.gnu.org> <20180914003239.5E7A8209FC@vcs0.savannah.gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1537029861 14622 195.159.176.226 (15 Sep 2018 16:44:21 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 15 Sep 2018 16:44:21 +0000 (UTC) User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) Cc: Paul Eggert To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Sep 15 18:44:16 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g1Dg8-0003hW-Iw for ged-emacs-devel@m.gmane.org; Sat, 15 Sep 2018 18:44:16 +0200 Original-Received: from localhost ([::1]:56194 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g1DiF-0000TZ-56 for ged-emacs-devel@m.gmane.org; Sat, 15 Sep 2018 12:46:27 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41786) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g1Di7-0000Q8-Pe for emacs-devel@gnu.org; Sat, 15 Sep 2018 12:46:20 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g1Di6-0003n7-TC for emacs-devel@gnu.org; Sat, 15 Sep 2018 12:46:19 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:44542) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g1Di6-0003mo-Og; Sat, 15 Sep 2018 12:46:18 -0400 Original-Received: from rgm by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1g1Di5-0004fj-IW; Sat, 15 Sep 2018 12:46:17 -0400 X-Spook: DHS Spillover 2600 Magazine Panama SRI Burst Matamoros X-Ran: KK&i:z_7?79*X(0W^KHq9NMx5HK2JKRQ'He>-H$dLI.3=+M@Kn#~%[w33&!HI9fg}["Hx3 X-Hue: magenta X-Attribution: GM In-Reply-To: <20180914003239.5E7A8209FC@vcs0.savannah.gnu.org> (Paul Eggert's message of "Thu, 13 Sep 2018 20:32:38 -0400 (EDT)") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:229816 Archived-At: 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.)