• Victor Stinner's avatar
    Issue #25155: Add _PyTime_AsTimevalTime_t() function · 1e2b6882
    Victor Stinner yazdı
    On Windows, the tv_sec field of the timeval structure has the type C long,
    whereas it has the type C time_t on all other platforms. A C long has a size of
    32 bits (signed inter, 1 bit for the sign, 31 bits for the value) which is not
    enough to store an Epoch timestamp after the year 2038.
    
    Add the _PyTime_AsTimevalTime_t() function written for datetime.datetime.now():
    convert a _PyTime_t timestamp to a (secs, us) tuple where secs type is time_t.
    It allows to support dates after the year 2038 on Windows.
    
    Enhance also _PyTime_AsTimeval_impl() to detect overflow on the number of
    seconds when rounding the number of microseconds.
    1e2b6882
Adı
Son kayıt (commit)
Son güncelleme
Doc Loading commit data...
Grammar Loading commit data...
Include Loading commit data...
Lib Loading commit data...
Mac Loading commit data...
Misc Loading commit data...
Modules Loading commit data...
Objects Loading commit data...
PC Loading commit data...
PCbuild Loading commit data...
Parser Loading commit data...
Programs Loading commit data...
Python Loading commit data...
Tools Loading commit data...
.bzrignore Loading commit data...
.gitignore Loading commit data...
.hgeol Loading commit data...
.hgignore Loading commit data...
.hgtags Loading commit data...
.hgtouch Loading commit data...
LICENSE Loading commit data...
Makefile.pre.in Loading commit data...
README Loading commit data...
aclocal.m4 Loading commit data...
config.guess Loading commit data...
config.sub Loading commit data...
configure Loading commit data...
configure.ac Loading commit data...
install-sh Loading commit data...
pyconfig.h.in Loading commit data...
setup.py Loading commit data...