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
e6a4b7bf
Kaydet (Commit)
e6a4b7bf
authored
Eki 08, 1997
tarafından
Guido van Rossum
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
timezone support for macintosh (Jack)
üst
5bd919b6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
0 deletions
+36
-0
timemodule.c
Modules/timemodule.c
+36
-0
No files found.
Modules/timemodule.c
Dosyayı görüntüle @
e6a4b7bf
...
...
@@ -89,6 +89,37 @@ extern int ftime();
static
int
floatsleep
Py_PROTO
((
double
));
static
double
floattime
Py_PROTO
(());
#ifdef macintosh
/* Our own timezone. We have enough information to deduce whether
** DST is on currently, but unfortunately we cannot put it to good
** use because we don't know the rules (and that is needed to have
** localtime() return correct tm_isdst values for times other than
** the current time. So, we cop out and only tell the user the current
** timezone.
*/
static
long
timezone
;
static
void
initmactimezone
()
{
MachineLocation
loc
;
long
delta
;
ReadLocation
(
&
loc
);
if
(
loc
.
latitude
==
0
&&
loc
.
longitude
==
0
&&
loc
.
u
.
gmtDelta
==
0
)
return
;
delta
=
loc
.
u
.
gmtDelta
&
0x00FFFFFF
;
if
(
delta
&
0x00800000
)
delta
|=
0xFF000000
;
timezone
=
-
delta
;
}
#endif
/* macintosh */
static
PyObject
*
time_time
(
self
,
args
)
PyObject
*
self
;
...
...
@@ -430,6 +461,11 @@ inittime()
ins
(
d
,
"tzname"
,
Py_BuildValue
(
"(zz)"
,
wintername
,
summername
));
}
#else
#ifdef macintosh
initmactimezone
();
ins
(
d
,
"timezone"
,
PyInt_FromLong
(
timezone
));
#endif
/* macintosh */
#endif
/* HAVE_TM_ZONE */
#endif
/* !HAVE_TZNAME */
if
(
PyErr_Occurred
())
...
...
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