emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/ebdb c9f8f33 226/350: Be more when careful migrating ti


From: Eric Abrahamsen
Subject: [elpa] externals/ebdb c9f8f33 226/350: Be more when careful migrating timestamps
Date: Mon, 14 Aug 2017 11:46:42 -0400 (EDT)

branch: externals/ebdb
commit c9f8f3368ce50257ea3db9e788a1da4f1e530bac
Author: Eric Abrahamsen <address@hidden>
Commit: Eric Abrahamsen <address@hidden>

    Be more when careful migrating timestamps
    
    * ebdb-migrate.el (ebdb-migrate-vector-to-class): The BBDB timestamps
      may be missing hour/minute/second values, in which case replace
      those nils with 0s.
---
 ebdb-migrate.el | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/ebdb-migrate.el b/ebdb-migrate.el
index 2c326ab..471a0c6 100644
--- a/ebdb-migrate.el
+++ b/ebdb-migrate.el
@@ -516,12 +516,22 @@ holding valid contacts in a previous BBDB format."
          (setq ts (make-instance 'ebdb-field-timestamp
                                  :timestamp
                                  (apply #'encode-time
-                                        (parse-time-string val)))))
+                                        (mapcar
+                                         (lambda (el)
+                                           (if (null el)
+                                               0
+                                             el))
+                                         (parse-time-string val))))))
         ((eq lab 'creation-date)
          (setq c-date (make-instance 'ebdb-field-creation-date
                                      :timestamp
                                      (apply #'encode-time
-                                            (parse-time-string val)))))
+                                            (mapcar
+                                             (lambda (el)
+                                               (if (null el)
+                                                   0
+                                                 el))
+                                             (parse-time-string val))))))
         ((eq lab 'mail-alias)
          (push (make-instance 'ebdb-field-mail-alias
                               :alias val



reply via email to

[Prev in Thread] Current Thread [Next in Thread]