fix date format

This commit is contained in:
Antonio J. Delgado 2025-03-28 10:22:57 +02:00
parent 456dc1b2db
commit 1ca50d1c15

View file

@ -101,7 +101,7 @@ class BackupImap:
os.mkdir(mailbox_path)
current = time.gmtime()
for year in range(current.tm_year-10, current.tm_year+1):
search_response, search_data = self.imap.search('UTF-8', f'(BEFORE "{year}-1-1")')
search_response, search_data = self.imap.search('UTF-8', f'(BEFORE "1-Jan-{year}")')
if search_response == 'OK':
all_msgs_uids = search_data[0].split()
self._log.debug(