# HG changeset patch # User Glenn Morris # Date 1284010723 25200 # Node ID 82751340524748e4a1b81c72f139291a799686a0 # Parent 885a9b44898e09978928fe020e52c8aa761fe4e9 * lisp/url/url-cookie.el (url-cookie-expired-p): Tweak previous change. diff -r 885a9b44898e -r 827513405247 lisp/url/ChangeLog --- a/lisp/url/ChangeLog Wed Sep 08 22:36:13 2010 -0700 +++ b/lisp/url/ChangeLog Wed Sep 08 22:38:43 2010 -0700 @@ -1,3 +1,7 @@ +2010-09-09 Glenn Morris + + * url-cookie.el (url-cookie-expired-p): Tweak previous change. + 2010-09-09 shawn boles (tiny change) * url-cookie.el (url-cookie-expired-p): Simplify and fix. (Bug#6957) diff -r 885a9b44898e -r 827513405247 lisp/url/url-cookie.el --- a/lisp/url/url-cookie.el Wed Sep 08 22:36:13 2010 -0700 +++ b/lisp/url/url-cookie.el Wed Sep 08 22:38:43 2010 -0700 @@ -1,7 +1,7 @@ ;;; url-cookie.el --- Netscape Cookie support -;; Copyright (C) 1996, 1997, 1998, 1999, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1996, 1997, 1998, 1999, 2004, 2005, 2006, 2007, 2008, +;; 2009, 2010 Free Software Foundation, Inc. ;; Keywords: comm, data, processes, hypermedia @@ -193,12 +193,9 @@ (setq url-cookie-storage (list (list domain tmp)))))))) (defun url-cookie-expired-p (cookie) - "Returns true if COOKIE is expired. -If COOKIE has an expiration date it is converted to seconds, adjusted to the client timezone and then compared against (float-time)." - (let* ((exp (url-cookie-expires cookie)) - (exp-time (and exp (float-time (date-to-time exp))))) - (if (not exp) nil (> (float-time) exp-time))) - ) + "Return non-nil if COOKIE is expired." + (let ((exp (url-cookie-expires cookie))) + (and exp (> (float-time) (float-time (date-to-time exp)))))) (defun url-cookie-retrieve (host &optional localpart secure) "Retrieve all the netscape-style cookies for a specified HOST and LOCALPART."