(require 'nnoo)
(require 'netrc)
(require 'utf7)
-(require 'parse-time)
(require 'nnmail)
(autoload 'auth-source-forget+ "auth-source")
(let ((result
(nnimap-command
"UID SEARCH SENTBEFORE %s"
- (format-time-string
- (format "%%d-%s-%%Y"
- (upcase
- (car (rassoc (decoded-time-month (decode-time cutoff))
- parse-time-months))))
- cutoff))))
+ (let ((system-time-locale "C"))
+ (upcase (format-time-string "%d-%b-%Y" cutoff))))))
(and (car result)
(delete 0 (mapcar #'string-to-number
(cdr (assoc "SEARCH" (cdr result)))))))))))
(eval-when-compile (require 'cl-lib))
(require 'mail-utils)
-(defvar parse-time-months)
(defgroup pop3 nil
"Post Office Protocol."
(defun pop3-make-date (&optional now)
"Make a valid date header.
If NOW, use that time instead."
- (require 'parse-time)
- (let* ((now (or now (current-time)))
- (zone (decoded-time-zone (decode-time now))))
- (when (< zone 0)
- (setq zone (- zone)))
- (concat
- (format-time-string "%d" now)
- ;; The month name of the %b spec is locale-specific. Pfff.
- (format " %s "
- (capitalize (car (rassoc (decoded-time-month (decode-time now))
- parse-time-months))))
- (format-time-string "%Y %H:%M:%S %z" now))))
+ ;; The month name of the %b spec is locale-specific. Pfff.
+ (let ((system-time-locale "C"))
+ (format-time-string "%d %b %Y %T %z" now)))
(defun pop3-munge-message-separator (start end)
"Check to see if a message separator exists. If not, generate one."
(if (and sec min hour day month year)
(encode-time
sec min hour day
+ ;; FIXME: Won't this fail if parse-time-months is configured
+ ;; by the user? See "The date/time prompt" in the Org manual.
+ ;; If the code is OK as-is, perhaps explain why in a comment.
(cdr (assoc (downcase month) parse-time-months))
year)
tramp-time-dont-know))