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
95789f8d
Kaydet (Commit)
95789f8d
authored
Ock 05, 2002
tarafından
Martin v. Löwis
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Check for time.struct_time in addition to tuples. Use 3 characters
for zone hours. Fixes #499169.
üst
f63438ad
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
imaplib.py
Lib/imaplib.py
+5
-5
No files found.
Lib/imaplib.py
Dosyayı görüntüle @
95789f8d
...
...
@@ -1069,12 +1069,12 @@ def Time2Internaldate(date_time):
Return string in form: '"DD-Mmm-YYYY HH:MM:SS +HHMM"'
"""
dttype
=
type
(
date_time
)
if
dttype
is
type
(
1
)
or
dttype
is
type
(
1.1
):
if
isinstance
(
date_time
,
int
)
or
isinstance
(
date_time
,
float
):
tt
=
time
.
localtime
(
date_time
)
elif
dttype
is
type
(()):
elif
isinstance
(
date_time
,
tuple
)
or
\
isinstance
(
date_time
,
time
.
struct_time
):
tt
=
date_time
elif
dttype
is
type
(
""
):
elif
isinstance
(
date_time
,
str
):
return
date_time
# Assume in correct format
else
:
raise
ValueError
...
...
@@ -1085,7 +1085,7 @@ def Time2Internaldate(date_time):
zone
=
-
time
.
altzone
else
:
zone
=
-
time
.
timezone
return
'"'
+
dt
+
"
%+0
2
d
%02
d"
%
divmod
(
zone
/
60
,
60
)
+
'"'
return
'"'
+
dt
+
"
%+0
3
d
%02
d"
%
divmod
(
zone
/
60
,
60
)
+
'"'
...
...
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