You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "Rok Mihevc (Jira)" <ji...@apache.org> on 2023/01/11 07:17:04 UTC
[jira] [Commented] (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:comment-tabpanel&focusedCommentId=17658769#comment-17658769 ]
Rok Mihevc commented on ARROW-1738:
-----------------------------------
This issue has been migrated to [issue #17743|https://github.com/apache/arrow/issues/17743] on GitHub. Please see the [migration documentation|https://github.com/apache/arrow/issues/14542] for further details.
> [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
> Priority: Major
> Fix For: 0.8.0
>
>
> {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
(v8.20.10#820010)