Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
19e0a9e5
Kaydet (Commit)
19e0a9e5
authored
Ock 29, 2011
tarafından
Alexander Belopolsky
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #10939: Fixed imaplib.Internaldate2tuple(). Thanks Joe Peterson
for the report and the patch. Reviewed by Georg Brandl.
üst
ac039aee
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
3 deletions
+15
-3
imaplib.py
Lib/imaplib.py
+3
-3
test_imaplib.py
Lib/test/test_imaplib.py
+11
-0
ACKS
Misc/ACKS
+1
-0
No files found.
Lib/imaplib.py
Dosyayı görüntüle @
19e0a9e5
...
@@ -1308,8 +1308,8 @@ class _Authenticator:
...
@@ -1308,8 +1308,8 @@ class _Authenticator:
Mon2num
=
{
'Jan'
:
1
,
'Feb'
:
2
,
'Mar'
:
3
,
'Apr'
:
4
,
'May'
:
5
,
'Jun'
:
6
,
Mon2num
=
{
b
'Jan'
:
1
,
b
'Feb'
:
2
,
b
'Mar'
:
3
,
b
'Apr'
:
4
,
b
'May'
:
5
,
b
'Jun'
:
6
,
'Jul'
:
7
,
'Aug'
:
8
,
'Sep'
:
9
,
'Oct'
:
10
,
'Nov'
:
11
,
'Dec'
:
12
}
b
'Jul'
:
7
,
b
'Aug'
:
8
,
b
'Sep'
:
9
,
b
'Oct'
:
10
,
b
'Nov'
:
11
,
b
'Dec'
:
12
}
def
Internaldate2tuple
(
resp
):
def
Internaldate2tuple
(
resp
):
"""Parse an IMAP4 INTERNALDATE string.
"""Parse an IMAP4 INTERNALDATE string.
...
@@ -1336,7 +1336,7 @@ def Internaldate2tuple(resp):
...
@@ -1336,7 +1336,7 @@ def Internaldate2tuple(resp):
# INTERNALDATE timezone must be subtracted to get UT
# INTERNALDATE timezone must be subtracted to get UT
zone
=
(
zoneh
*
60
+
zonem
)
*
60
zone
=
(
zoneh
*
60
+
zonem
)
*
60
if
zonen
==
'-'
:
if
zonen
==
b
'-'
:
zone
=
-
zone
zone
=
-
zone
tt
=
(
year
,
mon
,
day
,
hour
,
min
,
sec
,
-
1
,
-
1
,
-
1
)
tt
=
(
year
,
mon
,
day
,
hour
,
min
,
sec
,
-
1
,
-
1
,
-
1
)
...
...
Lib/test/test_imaplib.py
Dosyayı görüntüle @
19e0a9e5
...
@@ -23,6 +23,17 @@ CERTFILE = None
...
@@ -23,6 +23,17 @@ CERTFILE = None
class
TestImaplib
(
unittest
.
TestCase
):
class
TestImaplib
(
unittest
.
TestCase
):
def
test_Internaldate2tuple
(
self
):
tt
=
imaplib
.
Internaldate2tuple
(
b
'25 (INTERNALDATE "01-Jan-1970 00:00:00 +0000")'
)
self
.
assertEqual
(
time
.
mktime
(
tt
),
0
)
tt
=
imaplib
.
Internaldate2tuple
(
b
'25 (INTERNALDATE "01-Jan-1970 11:30:00 +1130")'
)
self
.
assertEqual
(
time
.
mktime
(
tt
),
0
)
tt
=
imaplib
.
Internaldate2tuple
(
b
'25 (INTERNALDATE "31-Dec-1969 12:30:00 -1130")'
)
self
.
assertEqual
(
time
.
mktime
(
tt
),
0
)
def
test_that_Time2Internaldate_returns_a_result
(
self
):
def
test_that_Time2Internaldate_returns_a_result
(
self
):
# We can check only that it successfully produces a result,
# We can check only that it successfully produces a result,
# not the correctness of the result itself, since the result
# not the correctness of the result itself, since the result
...
...
Misc/ACKS
Dosyayı görüntüle @
19e0a9e5
...
@@ -653,6 +653,7 @@ Trevor Perrin
...
@@ -653,6 +653,7 @@ Trevor Perrin
Gabriel de Perthuis
Gabriel de Perthuis
Tim Peters
Tim Peters
Benjamin Peterson
Benjamin Peterson
Joe Peterson
Chris Petrilli
Chris Petrilli
Bjorn Pettersen
Bjorn Pettersen
Geoff Philbrick
Geoff Philbrick
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment