summaryrefslogtreecommitdiff
path: root/lisp/url/url-cookie.el
diff options
context:
space:
mode:
authorAlan Mackenzie <acm@muc.de>2019-03-30 17:25:53 +0000
committerAlan Mackenzie <acm@muc.de>2019-03-30 17:25:53 +0000
commit8a23e8717008d31b4648c999c7a417f4729d239f (patch)
tree63a370a78c8ce92d3ba9a95cda9d00709c7799aa /lisp/url/url-cookie.el
parent2e04ddadab266d245a3bd0f6c19223ea515bdb90 (diff)
parentb619777dd67e271d639c6fb1d031650af8fd79e6 (diff)
downloademacs-8a23e8717008d31b4648c999c7a417f4729d239f.tar.gz
Merge branch 'master' into scratch/accurate-warning-pos
Diffstat (limited to 'lisp/url/url-cookie.el')
-rw-r--r--lisp/url/url-cookie.el11
1 files changed, 5 insertions, 6 deletions
diff --git a/lisp/url/url-cookie.el b/lisp/url/url-cookie.el
index 3adca26d76f..31fc3e72664 100644
--- a/lisp/url/url-cookie.el
+++ b/lisp/url/url-cookie.el
@@ -1,6 +1,6 @@
;;; url-cookie.el --- URL cookie support -*- lexical-binding:t -*-
-;; Copyright (C) 1996-1999, 2004-2018 Free Software Foundation, Inc.
+;; Copyright (C) 1996-1999, 2004-2019 Free Software Foundation, Inc.
;; Keywords: comm, data, processes, hypermedia
@@ -105,11 +105,10 @@ i.e. 1970-1-1) are loaded as expiring one year from now instead."
;; away, make it expire a year from now
(expires (format-time-string
"%d %b %Y %T [GMT]"
- (seconds-to-time
- (let ((s (string-to-number (nth 4 fields))))
- (if (and (= s 0) long-session)
- (seconds-to-time (+ (* 365 24 60 60) (float-time)))
- s)))))
+ (let ((s (string-to-number (nth 4 fields))))
+ (if (and (zerop s) long-session)
+ (time-add nil (* 365 24 60 60))
+ s))))
(key (nth 5 fields))
(val (nth 6 fields)))
(cl-incf n)