modify time of synced messages is 1 hour in the future

Nicolas Sebrecht nicolas.s-dev at laposte.net
Thu Oct 2 08:46:55 UTC 2014


I'm forwarding to the list this mail from Sebastian.

On Wed, Oct 01, 2014 at 11:42:36AM +0200, Sebastian Spaeth wrote:
> Am 01.10.2014 11:31, schrieb Nicolas Sebrecht:
> > On Tue, Sep 30, 2014 at 11:25:11AM -0600, Kyle Silfer wrote:
> >> Hello Offlineimap developers. Your software is awesome, but there appears to be a bug with the timestamps on synced files.
> >>
> >> I am having what seems to be the same problem posted by this user back in 2009:
> >>
> >> http://thread.gmane.org/gmane.mail.imap.offlineimap.general/1586
> >>
> >> The source IMAP server is Dovecot, read-only, and the destination is Cyrus. The timezones are the same on source and destination.
> > 
> > What is in charge of writing the files on the destination? IOW is the
> > destination type (a local maildir written by OfflineIMAP or a remote IMAP
> > Cyrus server)?
> 
> in folder/Maildir.py I see:
> if rtime != None:
> os.utime(os.path.join(self.getfullname(), tmpname), (rtime, rtime))
> 
> where those attributes are set. This is IMHO used for IMAP->IMAP
> ultimately, so the rtime attribute seems wrong.
> 
> Looking at this: GmailDir.py is weird, it has:
> 
> if rtime != None:
>   os.utime(filepath, (rtime, rtime))
> # save the new mtime and labels
> self.messagelist[uid]['mtime'] = long(os.stat(filepath).st_mtime)
> 
> setting a|ctime to a different value than mtime, using two system calls
> in a row (this looks weird and wrong in any case).
> 
> Sebastian
> >> After running offlineimap, a message with this Date header:
> >>
> >> Date: Tue, 30 Sep 2014 11:03:59 -0600
> >>
> >> ... arrives on the destination server with a modify time of 12:03:59. Here's the stat output on the file itself on the destination file system:
> >>
> >> Access: 2014-09-30 12:03:59.000000000 -0600
> >> Modify: 2014-09-30 12:03:59.000000000 -0600
> >> Change: 2014-09-30 11:04:40.782825328 -0600

-- 
Nicolas Sebrecht



More information about the OfflineIMAP-project mailing list