@@ -305,9 +305,14 @@ suite("ProfilerConfigService Tests", () => {
305305 const event = createTestEvent ( { timestamp : testTimestamp } ) ;
306306 const viewRow = configService . convertEventToViewRow ( event , view ) ;
307307
308- // Should be formatted as ISO string without T and Z
309- expect ( viewRow . StartTime ) . to . include ( "2024-01-15" ) ;
310- expect ( viewRow . StartTime ) . to . include ( "10:30:00" ) ;
308+ // Should be formatted in local timezone as "YYYY-MM-DD HH:mm:ss.SSS"
309+ const localYear = String ( testTimestamp . getFullYear ( ) ) ;
310+ const localMonth = String ( testTimestamp . getMonth ( ) + 1 ) . padStart ( 2 , "0" ) ;
311+ const localDay = String ( testTimestamp . getDate ( ) ) . padStart ( 2 , "0" ) ;
312+ const localHours = String ( testTimestamp . getHours ( ) ) . padStart ( 2 , "0" ) ;
313+ const localMinutes = String ( testTimestamp . getMinutes ( ) ) . padStart ( 2 , "0" ) ;
314+ expect ( viewRow . StartTime ) . to . include ( `${ localYear } -${ localMonth } -${ localDay } ` ) ;
315+ expect ( viewRow . StartTime ) . to . include ( `${ localHours } :${ localMinutes } :00` ) ;
311316 } ) ;
312317 } ) ;
313318
@@ -778,7 +783,7 @@ suite("ProfilerConfigService Tests", () => {
778783 } ) ;
779784 const typedRow = configService . convertEventToTypedRow ( event , view ) ;
780785
781- // Timestamp is formatted as "2024-06-15 10:30:00.000" by getColumnValue,
786+ // Timestamp is formatted in local timezone by getColumnValue,
782787 // then coerced back to a Date by coerceToColumnType
783788 expect ( typedRow . StartTime ) . to . be . an . instanceOf ( Date ) ;
784789 const startTime = typedRow . StartTime as Date ;
0 commit comments