Description
After (automatic) change of server time on Windows XP Pro from summer to winter time displaying diffs does no longer work. Instedad of showing the diff, a message is displayed indicating that no differences were found. In the message both timestamps are always the same:
- {{{Differences between versions dated 2004-10-04 06:54:38 and 2004-10-04 06:54:38
No differences found!}}}
Another (related) problem:
The Info of a page only shows empty fields for Editor and Comment since the time change. I still have to look into this in more detail. The patch below adresses only displaying of diffs. -- DavidLinke
Example
Since this Wiki does not show the bug an example cannot be given.
Details
MoinMoin Version |
1.2.3 |
OS and Version |
Win XP Pro |
Python Version |
Python 2.3.4 |
Server Setup and Version |
Apache 2.0.48 with mod_python 3.1.2b |
CGI and mod_python both show the error.
Workaround
The problem is in wikiaction.py:
- It turns out that sometimes the time stamp of the file is used (os.path.getmtime). This is different from the time stamp in the backup filename after changing to winter time.
This patch solves the problem for me . With the patch only the time from the backup filename is used.
- {{{*** c:/p-lang/python23/lib/site-packages/moinmoin/wikiaction.py.orig
--- c:/p-lang/python23/lib/site-packages/moinmoin/wikiaction.py *************** *** 246,252 ****
- for oldpage in oldversions:
- edit_count += 1 try:
! date = os.path.getmtime(os.path.join(config.backup_dir, oldpage))
except EnvironmentError:
- continue
if date <= diff1_date:
--- 246,252
- for oldpage in oldversions:
- edit_count += 1 try:
! date = int(oldpage.split('.')[1])
except EnvironmentError:
- continue
if date <= diff1_date:
*************** *** 258,264 ****
- if diff1_date == -1:
- first_oldpage = os.path.join(config.backup_dir, oldversions[0])
! first_olddate = os.path.getmtime(first_oldpage)
- oldpage = Page(pagename, date=str(int(first_olddate))) oldcount1 = oldcount1 - 1
- elif diff1_date == 0:
--- 258,264
- if diff1_date == -1:
- first_oldpage = os.path.join(config.backup_dir, oldversions[0])
! first_olddate = oldversions[0].split('.')[1]
- oldpage = Page(pagename, date=str(int(first_olddate))) oldcount1 = oldcount1 - 1
- elif diff1_date == 0:
}}}
Discussion
Versioning will completely change soon in 1.3devel. So this might get fixed as a side effect.
He uses 1.2.3 - so the bug has to be fixed in 1.2.x as well. IMHO its a major one. -- AlexanderSchremmer 2004-11-01 12:16:29
Next time this happens, he will use 1.3.
- Sure, but all old versions are no longer accessable... not so funny for a heavily used Intranet-Wiki.
- Which filesystem do you use? NTFS is known to be less vulnerable to such timezone things.
- The problem is on NTFS filesystem.
Is there anyone with the same problem? I would like to get some feedback if the patch works for others as well. -- DavidLinke 2004-11-01 16:20:18
I had the same problem and the changes listed to wikiaction.py fixed it. many thanks -- AndrewCoburn 2004-11-10 08:20:18
- Check with Beta 4, report status -- Nir
- He uses 1.2.x, no 1.3 here
Plan
- Priority: Low, 1.2.4 is last 1.2 release
Assigned to: ThomasWaldmann
- Status: fixed in 1.3 devel