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
6cdd7a04
Kaydet (Commit)
6cdd7a04
authored
Ara 12, 1996
tarafından
Guido van Rossum
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Add mktime_tz() which turns a date_tz 10-tuple into a standard Unix timestamp.
üst
21be1470
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
0 deletions
+11
-0
rfc822.py
Lib/rfc822.py
+11
-0
No files found.
Lib/rfc822.py
Dosyayı görüntüle @
6cdd7a04
...
...
@@ -468,6 +468,17 @@ def parsedate(data):
return
t
[:
9
]
else
:
return
t
def
mktime_tz
(
data
):
"""Turn a 10-tuple as returned by parsedate_tz() into a UTC timestamp.
Minor glitch: this first interprets the first 8 elements as a
local time and then compensates for the timezone difference;
this may yield a slight error around daylight savings time
switch dates. Not enough to worry about for common use.
"""
t
=
time
.
mktime
(
data
[:
8
]
+
(
0
,))
return
t
+
data
[
9
]
-
time
.
timezone
# When used as script, run a small test program.
# The first command line argument must be a filename containing one
...
...
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