Skip to content

Commit 7b35651

Browse files
committed
Adjust timestamps in test to work on 32 and 64-bit machines
1 parent 6a35bfa commit 7b35651

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

pandas/io/rdata/_rdata.pyx

+1-3
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,6 @@ cdef class LibrdataWriter():
344344
dict rdict
345345
dict rformats
346346
dict rtypes
347-
long long timeval
348347
bytes file_name
349348
bytes tbl_name
350349
rdata_writer_t *writer
@@ -368,8 +367,7 @@ cdef class LibrdataWriter():
368367

369368
if vtype == RDATA_TYPE_TIMESTAMP:
370369
for k, v in vdata.items():
371-
self.timeval = v
372-
rdata_append_timestamp_value(self.writer, self.timeval)
370+
rdata_append_timestamp_value(self.writer, v)
373371

374372
if vtype == RDATA_TYPE_STRING:
375373
for k, v in vdata.items():

pandas/tests/io/test_rdata.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -720,10 +720,10 @@ def test_write_read_dtypes(rtype, comp):
720720

721721
dts = [
722722
Timestamp.min.ceil("S"),
723-
Timestamp(-(10.0 ** 18.0)).ceil("S"),
723+
Timestamp("1950-01-01").ceil("S"),
724724
Timestamp(0),
725+
Timestamp("2000-01-01").floor("S"),
725726
Timestamp.now().floor("S"),
726-
Timestamp(10.0 ** 18.0).floor("S"),
727727
Timestamp.max.floor("S"),
728728
]
729729

0 commit comments

Comments
 (0)