Re: [Zope-dev] y2k
At the beginning of the world, while inventing the internet (no, Al Gore didn't :-)) I suggested a patch adressing that issue. However, I didn't write: e=(DateTime('GMT') + 365).rfc822() but: try: e=(self.ZopeTime()+365).rfc822() except: e='the old date value' The try: except: statement is for the guys whose timezone is not in DateTime.py. In that case, DateTimeObject+offset raises an exception. And yes, I find that using DateTime('GMT') is better than writing self.ZopeTime(). You are the best :-) Jephte CLAIN Service Informatique CHSR
I (and others) have found 1 Y2K bug (of a sort) in Zope 1.10.2 (and possibly earlier). The problem has not yet been solved in versions 1.11.0pr1 and 2.0.0.a1.
Zope uses cookies to make the size of editing windows in DTML Methods/Documents and SQL Methods persistent.
These cookies are hardwired to expire on the change of the millenium, and will not be returned by your browser in the year 2000 and later. This is just a minor inconvenience, Zope will cntinue to work if your server does, see comments by others.
Here are two patches that solve these problems. They were made using version 1.10.2, but probably work on other versions. YMMV. They solve the problem by relating the expiring date of the cookie to the current date. Cookies now will expire one year after they have been set.
At 08:12 27/05/99 , Service Informatique CHSR wrote:
At the beginning of the world, while inventing the internet (no, Al Gore didn't :-)) I suggested a patch adressing that issue. However, I didn't write:
e=(DateTime('GMT') + 365).rfc822()
but:
try: e=(self.ZopeTime()+365).rfc822() except: e='the old date value'
The try: except: statement is for the guys whose timezone is not in DateTime.py. In that case, DateTimeObject+offset raises an exception.
This will push DC into finally implementing my tzoffset patch =). Support for any timezone offset of whole hours.
And yes, I find that using DateTime('GMT') is better than writing self.ZopeTime().
According to the Netscape Cookie specification, all cookie expiration dates should be expressed in the GMT timezone... I thought Zope better comply, so it'll work in browsers that are picky about this. -- Martijn Pieters, Web Developer | Antraciet http://www.antraciet.nl | Tel: +31-35-6254545 Fax: +31-35-6254555 | mailto:mj@antraciet.nl http://www.antraciet.nl/~mj | PGP: http://wwwkeys.nl.pgp.net:11371/pks/lookup?op=get&search=0xA8A32149 ------------------------------------------
participants (2)
-
Martijn Pieters -
Service Informatique CHSR