Bug 20754 - System.IO.Packaging, invalid time format in PackagePropertiesPart.cs when using OpenXML SDK 2.5
Summary: System.IO.Packaging, invalid time format in PackagePropertiesPart.cs when usi...
Status: NEW
Alias: None
Product: Class Libraries
Classification: Mono
Component: WindowsBase (show other bugs)
Version: master
Hardware: PC Linux
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2014-06-20 09:57 UTC by Daniel Münch
Modified: 2014-06-20 09:58 UTC (History)
1 user (show)

Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
Proposed patch (2.76 KB, patch)
2014-06-20 09:58 UTC, Daniel Münch
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report for Bug 20754 on GitHub or Developer Community if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: GitHub Markdown or Developer Community HTML
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:
Status:
NEW

Description Daniel Münch 2014-06-20 09:57:58 UTC
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?
Comment 1 Daniel Münch 2014-06-20 09:58:29 UTC
Created attachment 7130 [details]
Proposed patch