The last two days or so I tried to use the OpenXML SDK in it's latest version to manipulate some Word files. I started developping on Visual Studio and everything worked fine, but since it's going to be a component used on a Linux Server I regulary tested on mono to see if things are compatible. (Googling for OpenXML and mono gives rather discouraging results so I preferred trying on my own.)
While Visual Studio created valid .docx files, the same code on mono (git main branch as of 17 june) would create files which Word refuses with a warning. Since Word is capable of recovering the "corrupted" file I figured that the problem might only be a small detail. Comparing the two files with the OpenXML SDK Productivity tool merely showed differences in /docProps/core.xml. After some fiddling around it was evident that the date format caused problems.
I digged into mono and indeed found the concerned part in mcs/class/WindowsBase/System.IO.Packaging/PackagePropertiesPart.cs. I came up with a quick fix, which I'd like to share with you. Any chances this might go into the official distribution?
Created attachment 7130 [details]