Submitted by : Simon Michael at: 2007-04-24T18:06:11+00:00 (13 years ago)
Name :
Category : Severity : Status :
Optional subject :  
Optional comment :

(new) test_linkTitleFrom failing --Simon Michael, Tue, 24 Apr 2007 18:06:18 +0000 reply

test_linkTitleFrom fails on my system:

Traceback (most recent call last):
 File "/zope-2.10/lib/python/Testing/ZopeTestCase/", line 98, in __call__
 File "/zope1/Products/ZWiki/", line 236, in test_linkTitleFrom
   self.failUnless( '4 hours' in r )
 File "", line 309, in failUnless
   if not expr: raise self.failureException, msg

r's actual value is:

'last edited  <a href="http://nohost/test_folder_1_/wiki/TestPage/diff" title="show last edit" >-1 year</a> ago'

-1 year should be 4 hours. The problem may lie in one of these changes:


(new) test_linkTitleFrom failing --betabug, Wed, 25 Apr 2007 06:49:18 +0000 reply

The first diff is adding the test -- also removing the except, but I believe that is not relevant here, except that it of course "masked" the problem. The second diff removed the toZone('UTC'), while the last one brought it back. I think we need something to check behaviour of toZone() for different times. Maybe it rolls differently when it hits a day border? Maybe it behaves different on different OSs? (with or without locale)?

... --simon, Fri, 27 Apr 2007 01:39:57 +0000 reply

Category: => user-browsing Status: => open

can't reproduce here --betabug, Wed, 02 May 2007 12:12:08 -0700 reply

Is it possible that on some platforms (I guess where you have "locale" support) DateTime?(str(DateTime?().ISO())) end up having timezone information for the locale timezone again?

That is: Could it be that a date string like "2007-05-02 10:11:04" is assumed to be e.g. in GMT+8 because of system locale? While in other systems (like mine) where we don't have locale support, zope assumes this to be in UTC (aka GMT).

Does the following show timezone information? And which time zone?

print DateTime('2007-05-02 10:11:04')
print DateTime('2007-05-02 10:11:04') == DateTime('2007-05-02 10:11:04 GMT+0')

On my system the output would be:

2007/05/02 10:11:04 GMT+0

debian 3.1 says... --betabug, Thu, 03 May 2007 08:21:20 -0700 reply

Thanks to Wu, I've learned that the output of that little test script on debian 3.1 is:

2007/05/02 10:11:04 GMT+2

Which is very interesting. This proves my theory. We will have to need to either:

So, I hope to have a solution Real Soon Now(TM)

seems to be a change in 2.10 in fact --betabug, Thu, 03 May 2007 08:43:39 -0700 reply

and not really platform related. This is the culprit:

... --simon, Fri, 04 May 2007 11:58:53 -0700 reply

Name: '#1331 test_linkTitleFrom failing' => '#1331 test_linkTitleFrom fails, "-1 year" appearing everywhere' Severity: normal => serious

Serious because we don't want these bad dates getting embedded all over the place.

fix is in darcs, running on now --betabug, Fri, 04 May 2007 14:36:20 -0700 reply

Status: open => closed

Keep in mind that 0.59 on Zope 2.10 is still problematic. For Zope 2.10 people might want to go to darcs code till 0.60 comes along.