Skip to content

Commit 1ee00ec

Browse files
BibianaCBjwebb
authored andcommitted
ODSReader: Fix bug on 'Last Modified' column.
Was not converting correctly. #342
1 parent bb5c539 commit 1ee00ec

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

flattentool/ODSReader.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717

1818
import re
1919
from collections import OrderedDict
20+
from datetime import datetime
2021

2122
import odf.opendocument
2223
from odf.table import Table, TableCell, TableRow
@@ -90,6 +91,8 @@ def readSheet(self, sheet):
9091
r"^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d$", date_value
9192
):
9293
date_value += "Z"
94+
elif re.match(r"^\d{4}-\d\d-\d\d$", date_value):
95+
datetime.strptime(date_value, "%Y-%m-%d").isoformat()
9396
arrCells[count] = date_value
9497
else:
9598
arrCells[count] = str(cell)

0 commit comments

Comments
 (0)