• Alexander Belopolsky's avatar
    bpo-33812: Corrected astimezone for naive datetimes. (GH-7578) · 877b2320
    Alexander Belopolsky yazdı
    A datetime object d is aware if d.tzinfo is not None and
    d.tzinfo.utcoffset(d) does  not return None. If d.tzinfo is None,
    or if d.tzinfo is not None but d.tzinfo.utcoffset(d) returns None,
     d is naive.
    
    This commit ensures that instances with non-None d.tzinfo, but
    d.tzinfo.utcoffset(d) returning None are treated as naive.
    
    In addition, C acceleration code will raise TypeError if
    d.tzinfo.utcoffset(d) returns an object with the type other than
    timedelta.
    
    * Updated the documentation.
    
    Assume that the term "naive" is defined elsewhere and remove the
    not entirely correct clarification.  Thanks, Tim.
    877b2320
Adı
Son kayıt (commit)
Son güncelleme
.github Loading commit data...
.vsts Loading commit data...
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...
m4 Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
.travis.yml Loading commit data...
LICENSE Loading commit data...
Makefile.pre.in Loading commit data...
README.rst 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...