Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id BFE5B200BE7 for ; Tue, 20 Dec 2016 20:08:15 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id BE722160B29; Tue, 20 Dec 2016 19:08:15 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 13EFA160B12 for ; Tue, 20 Dec 2016 20:08:14 +0100 (CET) Received: (qmail 64704 invoked by uid 500); 20 Dec 2016 19:08:14 -0000 Mailing-List: contact commits-help@arrow.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@arrow.apache.org Delivered-To: mailing list commits@arrow.apache.org Received: (qmail 64689 invoked by uid 99); 20 Dec 2016 19:08:14 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 20 Dec 2016 19:08:14 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 21844DFB85; Tue, 20 Dec 2016 19:08:14 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: wesm@apache.org To: commits@arrow.apache.org Message-Id: <3b1b2eefb48c453e84adde25ca5158b5@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: arrow git commit: ARROW-433: Correctly handle Arrow to Python date conversion for timezones west of London Date: Tue, 20 Dec 2016 19:08:14 +0000 (UTC) archived-at: Tue, 20 Dec 2016 19:08:15 -0000 Repository: arrow Updated Branches: refs/heads/master fe53fa409 -> 6ff5fcf1b ARROW-433: Correctly handle Arrow to Python date conversion for timezones west of London Verified with `TZ='America/New_York' py.test pyarrow` Author: Uwe L. Korn Closes #245 from xhochy/ARROW-433 and squashes the following commits: 06745d8 [Uwe L. Korn] Use more pythonic approach a55be24 [Uwe L. Korn] ARROW-433: Correctly handle Arrow to Python date conversion for timezones west of London Project: http://git-wip-us.apache.org/repos/asf/arrow/repo Commit: http://git-wip-us.apache.org/repos/asf/arrow/commit/6ff5fcf1 Tree: http://git-wip-us.apache.org/repos/asf/arrow/tree/6ff5fcf1 Diff: http://git-wip-us.apache.org/repos/asf/arrow/diff/6ff5fcf1 Branch: refs/heads/master Commit: 6ff5fcf1bfb67d817d6261596d47cf6a6d9c3c6c Parents: fe53fa4 Author: Uwe L. Korn Authored: Tue Dec 20 14:08:07 2016 -0500 Committer: Wes McKinney Committed: Tue Dec 20 14:08:07 2016 -0500 ---------------------------------------------------------------------- python/pyarrow/scalar.pyx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/arrow/blob/6ff5fcf1/python/pyarrow/scalar.pyx ---------------------------------------------------------------------- diff --git a/python/pyarrow/scalar.pyx b/python/pyarrow/scalar.pyx index 09f60e2..623e3e4 100644 --- a/python/pyarrow/scalar.pyx +++ b/python/pyarrow/scalar.pyx @@ -127,7 +127,7 @@ cdef class DateValue(ArrayValue): def as_py(self): cdef CDateArray* ap = self.sp_array.get() - return datetime.date.fromtimestamp(ap.Value(self.index) / 1000) + return datetime.datetime.utcfromtimestamp(ap.Value(self.index) / 1000).date() cdef class TimestampValue(ArrayValue):