You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Current's timezone comparison is not timzone object type sensitive. Even if two dates are UTC but different tzinfo object (e.g: datetime.timezone.utc and pytz.UTC) they will be considered different timezones.
This could lead to unstabilitites since a Timestamp can have both obejct types as tzinfo
Expected Output
importpytzimportdatetimeimportpandasaspddate=pd.Timestamp("13-12-2020",tzinfo=datetime.timezone.utc)
date2=pd.Timestamp("12-12-2020",tzinfo=pytz.UTC)
date-date2>>>Timedelta('1 days 00:00:00')
Output of pd.show_versions()
[paste the output of pd.show_versions() here below this line]
INSTALLED VERSIONS
commit : None
python : 3.6.9.final.0
python-bits : 64
OS : Linux
OS-release : 4.4.0-18362-Microsoft
machine : x86_64
processor : x86_64
byteorder : little
LC_ALL : None
LANG : C.UTF-8
LOCALE : en_US.UTF-8
Code Sample, a copy-pastable example if possible
Problem description
Current's timezone comparison is not timzone object type sensitive. Even if two dates are UTC but different tzinfo object (e.g: datetime.timezone.utc and pytz.UTC) they will be considered different timezones.
This could lead to unstabilitites since a Timestamp can have both obejct types as tzinfo
Expected Output
Output of
pd.show_versions()
[paste the output of
pd.show_versions()
here below this line]INSTALLED VERSIONS
commit : None
python : 3.6.9.final.0
python-bits : 64
OS : Linux
OS-release : 4.4.0-18362-Microsoft
machine : x86_64
processor : x86_64
byteorder : little
LC_ALL : None
LANG : C.UTF-8
LOCALE : en_US.UTF-8
pandas : 1.0.3
numpy : 1.18.2
pytz : 2019.3
dateutil : 2.8.1
pip : 19.3.1
setuptools : 45.0.0
Cython : None
pytest : None
hypothesis : None
sphinx : None
blosc : None
feather : None
xlsxwriter : None
lxml.etree : None
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : 2.11.1
IPython : None
pandas_datareader: None
bs4 : None
bottleneck : None
fastparquet : None
gcsfs : None
lxml.etree : None
matplotlib : 3.2.1
numexpr : None
odfpy : None
openpyxl : None
pandas_gbq : None
pyarrow : None
pytables : None
pytest : None
pyxlsb : None
s3fs : None
scipy : 1.4.1
sqlalchemy : None
tables : None
tabulate : None
xarray : None
xlrd : None
xlwt : None
xlsxwriter : None
numba : None
The text was updated successfully, but these errors were encountered: