Skip to content

Commit 6ff5fcf

Browse files
xhochywesm
authored andcommitted
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 <uwelk@xhochy.com> 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
1 parent fe53fa4 commit 6ff5fcf

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

python/pyarrow/scalar.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ cdef class DateValue(ArrayValue):
127127

128128
def as_py(self):
129129
cdef CDateArray* ap = <CDateArray*> self.sp_array.get()
130-
return datetime.date.fromtimestamp(ap.Value(self.index) / 1000)
130+
return datetime.datetime.utcfromtimestamp(ap.Value(self.index) / 1000).date()
131131

132132

133133
cdef class TimestampValue(ArrayValue):

0 commit comments

Comments
 (0)