GNU bug report logs -
#6957
url-cookie-expired-p
Previous Next
Reported by: shawn boles <shawn.boles <at> gmail.com>
Date: Tue, 31 Aug 2010 20:08:02 UTC
Severity: normal
Fixed in version 23.3
Done: Glenn Morris <rgm <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
Message #8 received at 6957 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
So this is buggier than I thought.
First, the hour normalization is still incorrect: there are 3600
seconds in an hour, not 360.
Second, the cookie expiration time is GMT, per the cookie spec. As is,
url-cookie-expired-p compares current time (no GMT adjustment) with a
GMT expiration time.
Please see the attached patch.
I fixed the hour normalization.
I added a function called url-cookie-gmt-time-string that returns the
current time adjusted to GMT. Please check this function. While I
believe my implementation is correct, there may be a better way to
adjust a time to GMT in Emacs.
I updated url-cookie-expire-p so that it compares local time as GMT
with the expiration time, also as GMT.
Thanks!
shawn
[url-cookie.el.patch (application/octet-stream, attachment)]
This bug report was last modified 14 years and 342 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.