Commit 957ede4b authored by CharlieC's avatar CharlieC
Browse files

Always return a datetime. Fixes failing tests.

--HG--
branch : 3.0
parent 1eb387b54cf8
Pipeline #18358 passed with stage
in 2 minutes and 47 seconds
......@@ -351,7 +351,7 @@ class TestCopy:
def test_default_epoch(self, Workbook):
wb = Workbook()
assert wb.epoch == "1899-12-30"
assert wb.epoch == datetime.datetime(1899, 12, 30)
def test_assign_epoch(self, Workbook):
......
......@@ -117,7 +117,9 @@ class Workbook(object):
@property
def epoch(self):
return self._epoch == WINDOWS_EPOCH and "1899-12-30" or "1904-01-01"
if self._epoch == WINDOWS_EPOCH:
return WINDOWS_EPOCH
return MAC_EPOCH
@epoch.setter
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment