When parsing `Date' header use function that respects sender's timezone. This
makes pygmy usable for FreeBSD lists ;).
This commit is contained in:
parent
747f085380
commit
45b50cfab0
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=42262
28
mail/pygmy/files/patch-folderops.py
Normal file
28
mail/pygmy/files/patch-folderops.py
Normal file
@ -0,0 +1,28 @@
|
||||
|
||||
$FreeBSD$
|
||||
|
||||
--- folderops.py 2001/05/04 21:59:28 1.1
|
||||
+++ folderops.py 2001/05/04 22:14:52
|
||||
@@ -295,7 +295,7 @@
|
||||
##
|
||||
##
|
||||
def create_folder_index(pathname, start=0):
|
||||
- import pygmymailbox, time, marshal, os, string, mimify
|
||||
+ import pygmymailbox, time, marshal, os, string, mimify, rfc822
|
||||
from string import replace, join
|
||||
from posixpath import split
|
||||
|
||||
@@ -342,11 +342,11 @@
|
||||
subject = replace(subject, '\n', '')
|
||||
subject = replace(subject, '\r', '')
|
||||
# Get the Date: field
|
||||
- date = m.getdate('date') or ""
|
||||
+ date = m.getdate_tz('date') or ""
|
||||
if date != "":
|
||||
# Convert to epoch value
|
||||
try:
|
||||
- date = time.mktime(date)
|
||||
+ date = rfc822.mktime_tz(date)
|
||||
except:
|
||||
date = time.time()
|
||||
else:
|
Loading…
Reference in New Issue
Block a user