private static DateTime getLinkerTimeStamp(string filePath)
{
const int PeHeaderOffset = 60;
const int LinkerTimestampOffset = 8;
byte[] b = new byte[2047];
using (System.IO.Stream s = new System.IO.FileStream(filePath, System.IO.FileMode.Open, System.IO.FileAccess.Read))
{
s.Read(b, 0, 2047);
}
int secondsSince1970 = BitConverter.ToInt32(b, BitConverter.ToInt32(b, PeHeaderOffset) + LinkerTimestampOffset);
return new DateTime(1970, 1, 1, 0, 0, 0).AddSeconds(secondsSince1970);
}