My OSS library needs to normalize dates in pdf files.
https://github.com/togakangaroo/ApprovalTests.BetterPdfVerification.
I therefore do
Code:
var knownDate = new DateTime(2010, 1, 1);
doc.Info.CreationDate = doc.Info.ModificationDate = knownDate;
This works, until its run by someone in a different timezone then we get mismatches because creation date and mod date have timezone components eg
Code:
/CreationDate(D:20100101000000-05'00')
DateTime in .Net famously does not have a timezone component. So where does that come from and how do I control it?