@@ -105,6 +105,7 @@ class Stats {
105105 const showEnv = optionOrLocalFallback ( options . env , false ) ;
106106 const showVersion = optionOrLocalFallback ( options . version , true ) ;
107107 const showTimings = optionOrLocalFallback ( options . timings , true ) ;
108+ const showBuiltAt = optionOrLocalFallback ( options . builtAt , true ) ;
108109 const showAssets = optionOrLocalFallback ( options . assets , true ) ;
109110 const showEntrypoints = optionOrLocalFallback ( options . entrypoints , true ) ;
110111 const showChunks = optionOrLocalFallback ( options . chunks , ! forToString ) ;
@@ -252,6 +253,9 @@ class Stats {
252253 if ( showHash ) obj . hash = this . hash ;
253254 if ( showTimings && this . startTime && this . endTime ) {
254255 obj . time = this . endTime - this . startTime ;
256+ }
257+
258+ if ( showBuiltAt && this . endTime ) {
255259 obj . builtAt = this . endTime ;
256260 }
257261
@@ -618,11 +622,11 @@ class Stats {
618622 newline ( ) ;
619623 }
620624 if ( typeof obj . builtAt === "number" ) {
621- const now = ( new Date ( obj . builtAt ) ) . toString ( ) . split ( " " ) ;
625+ const builtAtDate = new Date ( obj . builtAt ) ;
622626 colors . normal ( "Built at: " ) ;
623- colors . normal ( ` ${ now [ 0 ] } ${ now [ 1 ] } ${ now [ 2 ] } ${ now [ 3 ] } ` ) ;
624- colors . bold ( now [ 4 ] ) ;
625- colors . normal ( now [ 6 ] ? ` ${ now [ 5 ] } ${ now [ 6 ] } ` : ` ${ now [ 5 ] } ` ) ;
627+ colors . normal ( builtAtDate . toLocaleDateString ( ) ) ;
628+ colors . normal ( " " ) ;
629+ colors . bold ( builtAtDate . toLocaleTimeString ( ) ) ;
626630 newline ( ) ;
627631 }
628632 if ( obj . env ) {
0 commit comments