33// See the license.txt file in the project root for more information.
44
55using System ;
6+ using System . Globalization ;
67using System . IO ;
78using LibObjectFile . IO ;
89using static System . Runtime . InteropServices . JavaScript . JSType ;
@@ -413,7 +414,7 @@ private static void Print(PEExceptionDirectory data, ref TextWriterIndenter writ
413414
414415 private static void Print ( PEExportDirectory data , ref TextWriterIndenter writer )
415416 {
416- writer . WriteLine ( $ "{ nameof ( PEExportDirectory . TimeStamp ) } = { data . TimeStamp } ") ;
417+ writer . WriteLine ( $ "{ nameof ( PEExportDirectory . TimeStamp ) } = { FormatTimestamp ( data . TimeStamp ) } ") ;
417418 writer . WriteLine ( $ "{ nameof ( PEExportDirectory . MajorVersion ) } = { data . MajorVersion } ") ;
418419 writer . WriteLine ( $ "{ nameof ( PEExportDirectory . MinorVersion ) } = { data . MinorVersion } ") ;
419420 writer . WriteLine ( $ "{ nameof ( PEExportDirectory . OrdinalBase ) } = 0x{ data . OrdinalBase : X} ") ;
@@ -575,7 +576,7 @@ private static void Print(PEResourceEntry data, ref TextWriterIndenter writer)
575576 writer . WriteLine ( $ "> CodePage = { resourceFile . CodePage ? . EncodingName ?? "null" } , Data = { resourceFile . Data } ") ;
576577 break ;
577578 case PEResourceDirectoryEntry dir :
578- writer . WriteLine ( $ "> ByNames[{ dir . ByNames . Count } ], ByIds[{ dir . ByIds . Count } ] , TimeDateStamp = { dir . TimeDateStamp } , Version = { dir . MajorVersion } .{ dir . MinorVersion } ") ;
579+ writer . WriteLine ( $ "> ByNames[{ dir . ByNames . Count } ], ByIds[{ dir . ByIds . Count } ] , TimeDateStamp = { FormatTimestamp ( dir . TimeDateStamp ) } , Version = { dir . MajorVersion } .{ dir . MinorVersion } ") ;
579580 writer . Indent ( ) ;
580581
581582 for ( var i = 0 ; i < dir . ByNames . Count ; i ++ )
@@ -740,4 +741,6 @@ static string PEParent(PEObjectBase? obj)
740741 return "" ;
741742 }
742743 }
743- }
744+
745+ private static string FormatTimestamp ( DateTime timestamp ) => timestamp . ToString ( "MM/dd/yyyy HH:mm:ss" , CultureInfo . InvariantCulture ) ;
746+ }
0 commit comments