You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "Licht Takeuchi (JIRA)" <ji...@apache.org> on 2017/10/26 15:01:00 UTC
[jira] [Updated] (ARROW-1738) [Python] Wrong datetime conversion
when pa.array with unit
[ https://issues.apache.org/jira/browse/ARROW-1738?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Licht Takeuchi updated ARROW-1738:
----------------------------------
Description:
{code:java}
import pyarrow as pa
import datetime
pa.array([datetime.datetime.now()], type=pa.timestamp('s')) # OverflowError
pa.array([datetime.datetime.now()], type=pa.timestamp('ms')) # OverflowError
pa.array([datetime.datetime.now()], type=pa.timestamp('us')) # correct
pa.array([datetime.datetime.now()], type=pa.timestamp('ns')) # 1970-01-18 11:11:02.181293587
{code}
was:
```
import pyarrow as pa
import datetime
pa.array([datetime.datetime.now()], type=pa.timestamp('s')) # OverflowError
pa.array([datetime.datetime.now()], type=pa.timestamp('ms')) # OverflowError
pa.array([datetime.datetime.now()], type=pa.timestamp('us')) # correct
pa.array([datetime.datetime.now()], type=pa.timestamp('ns')) # 1970-01-18 11:11:02.181293587
```
> [Python] Wrong datetime conversion when pa.array with unit
> ----------------------------------------------------------
>
> Key: ARROW-1738
> URL: https://issues.apache.org/jira/browse/ARROW-1738
> Project: Apache Arrow
> Issue Type: Bug
> Components: Python
> Affects Versions: 0.7.1
> Reporter: Licht Takeuchi
> Assignee: Licht Takeuchi
>
> {code:java}
> import pyarrow as pa
> import datetime
> pa.array([datetime.datetime.now()], type=pa.timestamp('s')) # OverflowError
> pa.array([datetime.datetime.now()], type=pa.timestamp('ms')) # OverflowError
> pa.array([datetime.datetime.now()], type=pa.timestamp('us')) # correct
> pa.array([datetime.datetime.now()], type=pa.timestamp('ns')) # 1970-01-18 11:11:02.181293587
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)