You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@arrow.apache.org by "Licht Takeuchi (JIRA)" <ji...@apache.org> on 2017/10/26 15:00:02 UTC

[jira] [Created] (ARROW-1738) [Python] Wrong datetime conversion when pa.array with unit

Licht Takeuchi created ARROW-1738:
-------------------------------------

             Summary: [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


```
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
```



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)