modify time of synced messages is 1 hour in the future

Kyle Silfer kyle at rtoads.com
Thu Oct 2 16:57:17 BST 2014


On Oct 2, 2014, at 2:46 AM, Nicolas Sebrecht wrote:

> I'm forwarding to the list this mail from Sebastian.
> 
> On Wed, Oct 01, 2014 at 11:42:36AM +0200, Sebastian Spaeth wrote:
>> 
>> 
>> 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).

Is there a fix you can suggest I can apply to the code myself to fix the 1 hour offset?

./k

>> 
>>>> 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
> 
> _______________________________________________
> OfflineIMAP-project mailing list
> OfflineIMAP-project at lists.alioth.debian.org
> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/offlineimap-project
> 
> OfflineIMAP homepage: http://software.complete.org/offlineimap






More information about the OfflineIMAP-project mailing list