File tree Expand file tree Collapse file tree 1 file changed +1
-10
lines changed Expand file tree Collapse file tree 1 file changed +1
-10
lines changed Original file line number Diff line number Diff line change @@ -557,22 +557,13 @@ export const getTimeFromTimestamp = (
557
557
fullDate : boolean = false
558
558
) => {
559
559
const timestampToInt = parseInt ( timestamp ) ;
560
-
561
560
if ( isNaN ( timestampToInt ) ) {
562
561
return "" ;
563
562
}
564
563
const dateObject = new Date ( timestampToInt * 1000 ) ;
565
564
566
565
if ( fullDate ) {
567
- return `${ dateObject . getFullYear ( ) } -${ String (
568
- dateObject . getMonth ( ) + 1
569
- ) . padStart ( 2 , "0" ) } -${ String ( dateObject . getDay ( ) ) . padStart (
570
- 2 ,
571
- "0"
572
- ) } ${ dateObject . getHours ( ) } :${ String ( dateObject . getMinutes ( ) ) . padStart (
573
- 2 ,
574
- "0"
575
- ) } :${ String ( dateObject . getSeconds ( ) ) . padStart ( 2 , "0" ) } `;
566
+ return dateObject . toLocaleString ( ) ;
576
567
}
577
568
return `${ dateObject . getHours ( ) } :${ String ( dateObject . getMinutes ( ) ) . padStart (
578
569
2 ,
You can’t perform that action at this time.
0 commit comments