Submitted by : Bill Page at: 2006-04-11T17:07:50+00:00 (11 years ago)
Name :
Category : Severity : Status :
Optional subject :  
Optional comment :

I have set up two ZWiki in time zones 6 hours apart. When I use ZSyncer (0.7.0) identical ZWiki pages are consistently reported as being different by 6 hours even after successful sync. But Non-ZWiki pages synchronize exactly.

bobobase_modification_time vs. DublinCore?.modified() timestamp --Bill Page, Thu, 13 Apr 2006 10:48:10 -0700 reply

Looking at the code for ZSyncer and reviewing background information about this problem I see that the last modified time for objects in Zope has been an issue for some time. I presume that is why ZWiki introduced the 'last_edit_time' property. Unfortunately for ZSyncer this property is not the "standard" way to do this in newer Zope applications. Also the last_edit_time does not include any timezone information. As I understand it, the Zope module DublinCore? provides this, amoung other things. ZSyncer expects to get it's 'last edit date' from DublinCore? if possible, but if not it defaults to 'bobobase_modification_time' which for various reasons is quite unsatisfactory. See:

http://old.dzug.org/mailinglisten/zope-org-zope/archive/2004/2004-02/1076753430448/index_html?fullMode=1 http://sourceforge.net/project/shownotes.php?release_id=273570&group_id=28073 I have made an experimental patch to ZSyncer to make use of the 'last_edit_time' property of an object if it exists. This (almost) works but I find that for some pages I do not get the actual 'last_edit_time' even though I can see the property in ZMI. Maybe I am doing something wrong in the code?

Perhaps a better solution would be for ZWiki to implement DublinCore? timestamps in the same way as CMF objects? This would also improve compatibility with Plone. If we do this, can we provide a way to convert the existing 'last_edit_time' field value to DublicCore??

Is anyone else interested in this problem and willing to take a look at my modification to the ZSyncer code?

bobobase_modification_time vs. DublinCore?.modified() timestamp --simon, Thu, 13 Apr 2006 11:04:55 -0700 reply

I'm interested, but clueless about how to effectively debug this class of issues remotely. Thanks for looking into this tricky stuff. I think we do/should provide the dublin core lastEditTime (?) method, which would be better to use than zwiki's own last_edit_time property.

Your mention of timezones scares me, having just read Discovering the Local Time Zone: Why It's a Hard Problem. (warning! may disturb! :) It sounds like you're getting zsyncer+zwiki to work right in just one timezone to start with, which sounds good.

Coordinated Universal Time --Bill Page, Thu, 13 Apr 2006 11:26:13 -0700 reply

DublicCore? timestamps use UTC (GMT) or local standard time with a fixed offset, e.g. both "1994-11-05T13:15:30Z" and "1994-11-05T08:15:30-05:00" corresponds to "November 5, 1994, 8:15:30 am, US Eastern Standard Time".

See:

http://www.w3.org/TR/NOTE-datetime

http://dublincore.org/documents/dcmi-terms/#date

old developer notes on last_edit_time --Bill Page, Fri, 14 Apr 2006 07:40:27 -0700 reply

According to notes in 'Admin.py' 'creation_date' and 'last_edit_time' where converted from the Zope 'DateTime?' data type to '.ISO()' format date strings. Zope 'DateTime?' format is an absolute format that stores the date and time according to UTC but presents it according to a time zone that depends on context or explicit conversion. ISO format strings however do not contain any time zone information and so can not be easily compared between systems located in different time zones.

Perhaps this conversion to ISO format date strings was ill-considered?

needs testing --simon, Wed, 28 Feb 2007 09:34:57 +0000 reply

Bill, thanks for investigating this. Hopefully the #1186 fix has helped this also, and we do (should) provide the dublin core timestamp by now, so zsyncing of zwiki pages should just work as you'd expect. Can you give it another try ?

presumed fixed --betabug, Sat, 17 May 2008 10:30:15 -0700 reply

Status: open => closed