[Zope3-checkins] CVS: Zope3/src/zope/server/http - http_date.py:1.3

Anthony Baxter anthony@interlink.com.au
Thu, 9 Jan 2003 07:59:22 -0500


Update of /cvs-repository/Zope3/src/zope/server/http
In directory cvs.zope.org:/tmp/cvs-serv2359

Modified Files:
	http_date.py 
Log Message:
Removed redundant (and wrong!) daylight savings time adjustment. time.mktime()
does this correctly already. With this change, both the 
zope/server/http/tests/test_httpdate.py
and
zope/app/services/tests/test_cookiesessionservice.py
pass correctly for me again.

Please eyeball this change if you understand this stuff better (Tim), but 
bear in mind, as it was before this change, parse_http_date() was wrong
for my timezone (that's currently in DST).



=== Zope3/src/zope/server/http/http_date.py 1.2 => 1.3 ===
--- Zope3/src/zope/server/http/http_date.py:1.2	Wed Dec 25 09:15:24 2002
+++ Zope3/src/zope/server/http/http_date.py	Thu Jan  9 07:59:20 2003
@@ -145,8 +145,4 @@
             retval = int (time.mktime (unpack_rfc822(m)) - tz)
         else:
             return 0
-            # Thanks to Craig Silverstein <csilvers@google.com> for pointing
-            # out the DST discrepancy
-    if time.daylight and time.localtime(retval)[-1] == 1: # DST correction
-        retval = retval + (tz - time.altzone)
     return retval