summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_imaplib.py
blob: 33f6f8e7a91b30fbc7f44e4ad0a4b70186090a9d (plain)
1
2
3
4
5
6
7
8
9
10
11
import imaplib

# Can't use time.time() values, as they are O/S specific

timevalues = [(2033, 5, 18, 3, 33, 20, 2, 138, 0), '"18-May-2033 13:33:20 +1000"']

for t in timevalues:
    t1 = imaplib.Time2Internaldate(t)
    t2 = imaplib.Time2Internaldate(imaplib.Internaldate2tuple('INTERNALDATE ' + t1))
    if t1 <> t2:
        print 'incorrect result when converting', `t`