Skip to content

DatetimeProperties.date problem with time zones #21542

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
MatthiasThul opened this issue Jun 19, 2018 · 3 comments
Closed

DatetimeProperties.date problem with time zones #21542

MatthiasThul opened this issue Jun 19, 2018 · 3 comments

Comments

@MatthiasThul
Copy link

MatthiasThul commented Jun 19, 2018

Code Sample

import pandas as pd
x = pd.Timestamp('2018-07-20 18:15:00+0200')
y = pd.DataFrame([{'date': x}])
y['date'].dt.date[0]

Problem description

In Pandas 0.23.0, this returns 2018-07-19 while in 0.22.0 it returns 2018-07-20. The behaviour in 0.22.0 is the expected one. I tested this in two virtual environments on the same machine. The version output of both environments is attached below.

Output of pd.show_versions() for Virtual Env. with Pandas 0.23.0

INSTALLED VERSIONS ------------------ commit: None python: 3.6.3.final.0 python-bits: 64 OS: Darwin OS-release: 16.7.0 machine: x86_64 processor: i386 byteorder: little LC_ALL: en_US.UTF-8 LANG: en_US.UTF-8 LOCALE: en_US.UTF-8

pandas: 0.23.0
pytest: None
pip: 9.0.1
setuptools: 28.8.0
Cython: None
numpy: 1.14.5
scipy: None
pyarrow: None
xarray: None
IPython: None
sphinx: None
patsy: None
dateutil: 2.7.3
pytz: 2018.4
blosc: None
bottleneck: None
tables: None
numexpr: None
feather: None
matplotlib: None
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: None
lxml: None
bs4: None
html5lib: None
sqlalchemy: None
pymysql: None
psycopg2: None
jinja2: None
s3fs: None
fastparquet: None
pandas_gbq: None
pandas_datareader: None

Output of pd.show_versions() for Virtual Env. with Pandas 0.22.0

INSTALLED VERSIONS ------------------ commit: None python: 3.6.3.final.0 python-bits: 64 OS: Darwin OS-release: 16.7.0 machine: x86_64 processor: i386 byteorder: little LC_ALL: en_US.UTF-8 LANG: en_US.UTF-8 LOCALE: en_US.UTF-8

pandas: 0.22.0
pytest: None
pip: 9.0.1
setuptools: 28.8.0
Cython: None
numpy: 1.14.5
scipy: None
pyarrow: None
xarray: None
IPython: None
sphinx: None
patsy: None
dateutil: 2.7.3
pytz: 2018.4
blosc: None
bottleneck: None
tables: None
numexpr: None
feather: None
matplotlib: None
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: None
lxml: None
bs4: None
html5lib: None
sqlalchemy: None
pymysql: None
psycopg2: None
jinja2: None
s3fs: None
fastparquet: None
pandas_gbq: None
pandas_datareader: None

@Liam3851
Copy link
Contributor

@MatthiasThul This was fixed in 0.23.1, see #21230, #21267, #21281.

@mroeschke
Copy link
Member

Yes this is fixed in 0.23.1.

@MatthiasThul
Copy link
Author

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants