summaryrefslogtreecommitdiff
path: root/lisp/calc/calc-forms.el
diff options
context:
space:
mode:
authorJay Belanger <jay.p.belanger@gmail.com>2015-04-09 19:03:19 -0500
committerJay Belanger <jay.p.belanger@gmail.com>2015-04-09 19:03:19 -0500
commite368697ce3647f1f34f4777d553604866c56ad25 (patch)
tree5990688ef219ac9d29cd04e775018f282a63b016 /lisp/calc/calc-forms.el
parentc1daad42c643d71fa022b35512457c9e4fbb8b6d (diff)
downloademacs-e368697ce3647f1f34f4777d553604866c56ad25.tar.gz
emacs-e368697ce3647f1f34f4777d553604866c56ad25.tar.bz2
emacs-e368697ce3647f1f34f4777d553604866c56ad25.zip
Fix description of Unix time, mention new function.
* lisp/calc/calc-forms.el (calcFunc-unixtime): Fix adjustment for Unix time. * doc/misc/calc.texi (Date Forms): Fix description of Unix time. (Basic Operations on Units): Mention `calc-convert-exact-units'.
Diffstat (limited to 'lisp/calc/calc-forms.el')
-rw-r--r--lisp/calc/calc-forms.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/calc/calc-forms.el b/lisp/calc/calc-forms.el
index ca6d021cef2..c6e1fdbbeaa 100644
--- a/lisp/calc/calc-forms.el
+++ b/lisp/calc/calc-forms.el
@@ -1438,11 +1438,11 @@ as measured in the integer number of days before December 31, 1 BC (Gregorian)."
(defun calcFunc-unixtime (date &optional zone)
(if (math-realp date)
(progn
- (setq date (math-add 719164 (math-div date '(float 864 2))))
+ (setq date (math-add 719163 (math-div date '(float 864 2))))
(list 'date (math-sub date (math-div (calcFunc-tzone zone date)
'(float 864 2)))))
(if (eq (car date) 'date)
- (math-add (nth 1 (math-date-parts (nth 1 date) 719164))
+ (math-add (nth 1 (math-date-parts (nth 1 date) 719163))
(calcFunc-tzone zone date))
(math-reject-arg date 'datep))))