Einzelnen Beitrag anzeigen

WojTec

Registriert seit: 17. Mai 2007
480 Beiträge
 
Delphi XE6 Professional
 
#1

Timestamp to valid Delphi's datetime

  Alt 17. Sep 2013, 09:52
Delphi-Version: 2010
I want to know datatime of PE compilation. So, I learned a bit about PE and finally got TimeDateStamp field in PE header. Unfortunately this is cardinal value and it's useless in Delphi. So, I performed conversion:

FormatDateTime('c', EncodeDate(1970, 1, 1) + h.TimeDateStamp / 86400)
Code:
TimeDateStamp = 1379407669
DateTime = 17.09.13 08:47:49
Result is 2hrs back. Question: I did wrong conversion or need to add 2hrs in any case?
  Mit Zitat antworten Zitat