Commit ee028db4 authored by Christer Ekholm's avatar Christer Ekholm

Fix bug 1701

* view-text.el (lyskom-mx-date-to-time): Removed the use of
calendar-iso-from-absolute and calendar-absolute-from-gregorian from
calendar. Use instead decode-time and encode-time to complete the
result from parse-time-string to include weekday.
parent 43d28928
2014-07-22 Christer Ekholm <che@chrekh.se>
Fix bug 1701:
* view-text.el (lyskom-mx-date-to-time): Removed the use of
calendar-iso-from-absolute and calendar-absolute-from-gregorian
from calendar. Use instead decode-time and encode-time to complete
the result from parse-time-string to include weekday.
2014-07-13 Christer Ekholm <che@chrekh.se>
* help-compile.el (lyskom-help-compile-to-el): set
......
......@@ -1300,11 +1300,9 @@ Args: TEXT-STAT of the text being read."
(lyskom-with-external-functions (calendar-iso-from-absolute
calendar-absolute-from-gregorian)
(defun lyskom-mx-date-to-time (mx-date)
(when mx-date
(let* ((date (parse-time-string (aux-item->data mx-date)))
(let* ((date (decode-time (apply 'encode-time (parse-time-string (aux-item->data mx-date)))))
(now (decode-time))
(sec (or (elt date 0) 0))
(min (or (elt date 1) 0))
......@@ -1317,16 +1315,7 @@ Args: TEXT-STAT of the text being read."
(zone (elt date 8)))
(setq date (if kom-show-mx-date-as-local
(decode-time (encode-time sec min hour day month year wday dst zone))
(list sec min hour day month year wday dst zone)))
(unless (elt date 6)
(setq date
(lyskom-replace-in-list
date 6
(abs (elt
(calendar-iso-from-absolute
(calendar-absolute-from-gregorian
(list (elt date 4) (elt date 3) (elt date 5))))
1)))))
(list sec min hour day month year wday dst zone)))
(lyskom-create-time (elt date 0)
(elt date 1)
(elt date 2)
......@@ -1336,7 +1325,7 @@ Args: TEXT-STAT of the text being read."
(elt date 6)
0
(elt date 7)
(elt date 8))))))
(elt date 8)))))
;;; Local Variables:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment