This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# This script is useful for setting fallback mtime for isync/mbsync CopyArrivalDate option | |
# If you use notmuch then you could do something like this to fix mtime on new mail | |
# notmuch search --output=files tag:new | xargs -P0 -i ~/code/mailutils/fix_maildir_mtime.py {} | |
import email | |
import sys | |
import os | |
from email.utils import parsedate_tz, mktime_tz |