Datetime 为什么在2010年编译了这么多PE文件?

Datetime 为什么在2010年编译了这么多PE文件?,datetime,compilation,timestamp,executable,portable-executable,Datetime,Compilation,Timestamp,Executable,Portable Executable,我正在使用pefile python包进行一些PE文件分析。我使用pefile从标题中提取时间戳并查找编译年份。 以下是提取代码的一部分: dates_list = [] for program in path_list: pe = pefile.PE(program, fast_load=True) file_header_dict = pe.FILE_HEADER.dump_dict() string_date = file_header_dict[&qu

我正在使用pefile python包进行一些PE文件分析。我使用pefile从标题中提取时间戳并查找编译年份。 以下是提取代码的一部分:

dates_list = []    
for program in path_list:

    pe = pefile.PE(program, fast_load=True)

    file_header_dict = pe.FILE_HEADER.dump_dict()
    string_date = file_header_dict["TimeDateStamp"]["Value"]

    parsed_date = string_date[string_date.find("[") + 1 : string_date.find("]")]
    date_object = datetime.datetime.strptime(parsed_date, "%a %b %d %H:%M:%S %Y %Z")

    dates_list.append(date_object.year)
这很好,但会产生一些奇怪的结果。图为:

这些只是我电脑上的普通windows.exe。为什么这么多人是1970年的?2010年的高峰有什么原因吗

同样没有照片的是那些声称来自未来(2021年后)的.exes,我把它们归因于Windows10的怪异,但也欢迎对这个问题发表评论


pefile使用UTC,因此我认为这不是本地化问题。

事实上,时间戳(可执行文件中有几个时间戳)并不总是有意义的,并且可以轻松修改。有些编译器甚至不在其中输入有效日期


干杯,那么有没有更好的方法来了解.exe年龄?