RE: [Zope] bobobase_modification_time one day back?
Function TimeStamp_yad(int y) in zope-2.1.4-src\lib\python\zodb\TimeStamp.c expects a 1900 based year (i.e. 0 = 1900, 2000=100, etc.), for positive agruments, when computing (y+300)/400.
TimeStamp_abst(int y, int mo, int d, int m, int s) seems to expect a 0 based year, on the other hand.
l = y%4==0 && (y%100 != 0 || y%400==0)
But it gets called with a 1900 based year in line 290 in function TimeStamp_timeTime(
TimeStamp_abst(TimeStamp_y-1900, TimeStamp_m- 1, TimeStamp_d-1,
Thanks for investigating this - because TimeStamp objects are used in the object database, I don't want to make any changes to this yet until I can talk to Jim and verify that the fix won't have any impact on ZODB code (mon. morning probably). Brian Lloyd brian@digicool.com Software Engineer 540.371.6909 Digital Creations http://www.digicool.com
On 2 Mar 00, at 17:33, Brian Lloyd wrote:
Thanks for investigating this - because TimeStamp objects are used in the object database, I don't want to make any changes to this yet until I can talk to Jim and verify that the fix won't have any impact on ZODB code (mon. morning probably).
That's why I didn't suggest a fix in my first analysis. I don't know anything about the internals of the Zope object data base (hey, I learned about Zope only about two months ago, so what do you expect?). So I don't even know whether it's just a problem of displaying the wrong date, or whether wrong time stamps are written to the data base. In the latter case, most people would prefer to have that bug fix yesterday. Inconsistent dates in a data base are a serious problem, and it's getting worse as longer it lasts. -- Wolfgang
From: <ws@gmd.de>
That's why I didn't suggest a fix in my first analysis. I don't know anything about the internals of the Zope object data base (hey, I learned about Zope only about two months ago, so what do you expect?). So I don't even know whether it's just a problem of displaying the wrong date, or whether wrong time stamps are written to the data base. In the latter case, most people would prefer to have that bug fix yesterday. Inconsistent dates in a data base are a serious problem, and it's getting worse as longer it lasts.
From my tests I am pretty sure the right dates are stored. It is just the timeTime() representation of those dates that is wrong.
However, as you pointed out, the methods that provide the representation are a bit confused over what format the year portion should be in when called. This,and the fact its something so deeply part of the ZODB makes a fix something that Jim can do.. =) Martijn Pieters | Software Engineer mailto:mj@digicool.com | Digital Creations http://www.digicool.com/ | Creators of Zope http://www.zope.org/ | The Open Source Web Application Server ---------------------------------------------
participants (3)
-
Brian Lloyd -
Martijn Pieters -
ws@gmd.de