(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))
(setq uid (replace-regexp-in-string
"%h"
(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)
(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
(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))