-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
TST: .timestamp() uses local timezone #18037
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
Comments
I'm able to reproduce this locally. Strange that it isn't failing on Travis. Probably from #17906. cc @jbrockmendel, are you able to reproduce locally? If not I can start debugging |
FWIW, here's the difference:
That's 5 hours, and I'm in central time zone. |
What TZ are Travis envs locale?
…Sent from my iPhone
On Oct 30, 2017, at 11:29 AM, Tom Augspurger ***@***.***> wrote:
I'm able to reproduce this locally. Strange that it isn't failing on Travis.
Probably from #17906. cc @jbrockmendel, are you able to reproduce locally? If not I can start debugging
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Not sure, we do override one at
https://github.com/pandas-dev/pandas/blob/master/.travis.yml#L40
On Mon, Oct 30, 2017 at 3:03 PM, jbrockmendel <[email protected]>
wrote:
… What TZ are Travis envs locale?
Sent from my iPhone
> On Oct 30, 2017, at 11:29 AM, Tom Augspurger ***@***.***>
wrote:
>
> I'm able to reproduce this locally. Strange that it isn't failing on
Travis.
>
> Probably from #17906. cc @jbrockmendel, are you able to reproduce
locally? If not I can start debugging
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub, or mute the thread.
>
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#18037 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABQHIgxsmmOWePP-QB-jtoEPajKNww5oks5sxiubgaJpZM4QLn7y>
.
|
.timestamp() is really dumb here it uses the local tz if it’s not specified : https://docs.python.org/3/library/datetime.html#datetime-objects so need to specify this in a context manager |
Using the local timezone is about the worse possible behavior, but I guess this follows the c libraries :<
|
@kchomski-reef if you'd like to do a PR to fix would be great! |
@jreback I will definitely try if I find some time to look closer into it. |
@kchomski-reef thanks! |
Code Sample, a copy-pastable example if possible
Problem description
On
python3.5
andpython3.6
unittests fail as shown above.Same results via
pytest pandas
and./test_fast.sh
.Expected Output
Passing unittests.
Output of
pd.show_versions()
INSTALLED VERSIONS
commit: 8449ffd
python: 3.6.3.final.0
python-bits: 64
OS: Linux
OS-release: 4.10.0-37-generic
machine: x86_64
processor: x86_64
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8
LOCALE: en_US.UTF-8
pandas: 0.21.0rc1+67.g8449ffd
pytest: 3.2.3
pip: 9.0.1
setuptools: 36.6.0
Cython: None
numpy: 1.13.3
scipy: None
pyarrow: None
xarray: None
IPython: 6.2.1
sphinx: 1.6.5
patsy: None
dateutil: 2.6.1
pytz: 2017.3
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: 1.0b10
sqlalchemy: None
pymysql: None
psycopg2: None
jinja2: 2.9.6
s3fs: None
fastparquet: None
pandas_gbq: None
pandas_datareader: None
The text was updated successfully, but these errors were encountered: