Skip to content
This repository has been archived by the owner on May 26, 2022. It is now read-only.

Add support for writing date cells #765

Closed
wants to merge 6 commits into from
Closed

Conversation

guss77
Copy link
Contributor

@guss77 guss77 commented Sep 5, 2020

The ODS writer is missing support for cells of type DateTime to use the ODS cell type office:date-value. This code also puts in the calcext types... because it doesn't hurt, I guess?

My bad with previous commit - according to [OASIS 1.2 spec](http://docs.oasis-open.org/office/v1.2/os/OpenDocument-v1.2-os-part1.html#datatype-dateOrDateTime) and [XML Schema part 2](https://www.w3.org/TR/2004/REC-xmlschema-2-20041028/#dateTime), the date time value should always be either UTC or non-timezoned. Since MS-Excel doesn't like time zones in its ODS importer, I'm also removing the time zone value, after converting to UTC and formatting.

Tested with LibreOffice and Excel Online.
@guss77
Copy link
Contributor Author

guss77 commented Sep 5, 2020

huh. apparently I already submitted a PR about this a while back: #752 to fix issue #751.

I'm closing that PR because this one is superior and works with Microsoft ODS imports.

@aphofstede
Copy link

@guss77
Copy link
Contributor Author

guss77 commented Oct 30, 2020

@aphofstede - I'm not really sure what broke there: it looks like vendor/bin/php-cs-fixer fix failed? I don't even know what that is. If you can, if appreciate if you can explain what is wrong. I'll also try to run the CI locally and see if I can repro, tomorrow.

@guss77
Copy link
Contributor Author

guss77 commented Oct 31, 2020

Ok, it still fails, but all the rest are PHP docs which are not part of what I changed. I can fix them if you want. Let me know.

@marzoli
Copy link

marzoli commented Apr 16, 2021

Merge please

@Slamdunk
Copy link

Slamdunk commented Mar 2, 2022

Merged in openspout/openspout#8

@guss77
Copy link
Contributor Author

guss77 commented Mar 2, 2022

merged upstream

@guss77 guss77 closed this Mar 2, 2022
@guss77 guss77 deleted the patch-2 branch March 2, 2022 13:57
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants