Skip to content

Commit

Permalink
fix: ods: use datevalue attribute for datetime
Browse files Browse the repository at this point in the history
  • Loading branch information
pascalfree committed Jul 10, 2024
1 parent cd0ce71 commit bf53c0f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/tablib/formats/_ods.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ def dset_sheet(cls, dataset, ws):
cell = table.TableCell(valuetype="float", value=col)
elif isinstance(col, dt.datetime):
cell = table.TableCell(
valuetype="date", value=col.strftime('%Y-%m-%dT%H:%M:%S')
valuetype="date", datevalue=col.strftime('%Y-%m-%dT%H:%M:%S')
)
elif isinstance(col, dt.date):
cell = table.TableCell(valuetype="date", datevalue=col.strftime('%Y-%m-%d'))
Expand Down

0 comments on commit bf53c0f

Please sign in to comment.