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
e99d3a16
Kaydet (Commit)
e99d3a16
authored
Haz 22, 2012
tarafından
Alexander Belopolsky
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #14653: email.utils.mktime_tz() no longer relies on system
mktime() when timezone offest is supplied.
üst
9bd4bf2a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
4 deletions
+13
-4
_parseaddr.py
Lib/email/_parseaddr.py
+4
-4
test_email.py
Lib/email/test/test_email.py
+6
-0
NEWS
Misc/NEWS
+3
-0
No files found.
Lib/email/_parseaddr.py
Dosyayı görüntüle @
e99d3a16
...
@@ -13,7 +13,7 @@ __all__ = [
...
@@ -13,7 +13,7 @@ __all__ = [
'quote'
,
'quote'
,
]
]
import
time
import
time
,
calendar
SPACE
=
' '
SPACE
=
' '
EMPTYSTRING
=
''
EMPTYSTRING
=
''
...
@@ -150,13 +150,13 @@ def parsedate(data):
...
@@ -150,13 +150,13 @@ def parsedate(data):
def
mktime_tz
(
data
):
def
mktime_tz
(
data
):
"""Turn a 10-tuple as returned by parsedate_tz() into a
UTC
timestamp."""
"""Turn a 10-tuple as returned by parsedate_tz() into a
POSIX
timestamp."""
if
data
[
9
]
is
None
:
if
data
[
9
]
is
None
:
# No zone info, so localtime is better assumption than GMT
# No zone info, so localtime is better assumption than GMT
return
time
.
mktime
(
data
[:
8
]
+
(
-
1
,))
return
time
.
mktime
(
data
[:
8
]
+
(
-
1
,))
else
:
else
:
t
=
time
.
mktime
(
data
[:
8
]
+
(
0
,)
)
t
=
calendar
.
timegm
(
data
)
return
t
-
data
[
9
]
-
time
.
timezone
return
t
-
data
[
9
]
def
quote
(
str
):
def
quote
(
str
):
...
...
Lib/email/test/test_email.py
Dosyayı görüntüle @
e99d3a16
...
@@ -2262,6 +2262,12 @@ class TestMiscellaneous(TestEmailBase):
...
@@ -2262,6 +2262,12 @@ class TestMiscellaneous(TestEmailBase):
eq
(
time
.
localtime
(
t
)[:
6
],
timetup
[:
6
])
eq
(
time
.
localtime
(
t
)[:
6
],
timetup
[:
6
])
eq
(
int
(
time
.
strftime
(
'
%
Y'
,
timetup
[:
9
])),
2003
)
eq
(
int
(
time
.
strftime
(
'
%
Y'
,
timetup
[:
9
])),
2003
)
def
test_mktime_tz
(
self
):
self
.
assertEqual
(
utils
.
mktime_tz
((
1970
,
1
,
1
,
0
,
0
,
0
,
-
1
,
-
1
,
-
1
,
0
)),
0
)
self
.
assertEqual
(
utils
.
mktime_tz
((
1970
,
1
,
1
,
0
,
0
,
0
,
-
1
,
-
1
,
-
1
,
1234
)),
-
1234
)
def
test_parsedate_y2k
(
self
):
def
test_parsedate_y2k
(
self
):
"""Test for parsing a date with a two-digit year.
"""Test for parsing a date with a two-digit year.
...
...
Misc/NEWS
Dosyayı görüntüle @
e99d3a16
...
@@ -70,6 +70,9 @@ Core and Builtins
...
@@ -70,6 +70,9 @@ Core and Builtins
Library
Library
-------
-------
- Issue #14653: email.utils.mktime_tz() no longer relies on system
mktime() when timezone offest is supplied.
- Issue #15101: Make pool finalizer avoid joining current thread.
- Issue #15101: Make pool finalizer avoid joining current thread.
- Issue #15054: A bug in tokenize.tokenize that caused string literals
- Issue #15054: A bug in tokenize.tokenize that caused string literals
...
...
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