var TIME = 1679287353711;
var date = new Date(TIME);
var hours = date.getUTCHours() + (date.getTimezoneOffset() / 60);
if (hours < 10) {
hours = '0' + hours;
}
var minutes = date.getUTCMinutes();
if (minutes < 10) {
minutes = '0' + minutes;
}
var seconds = date.getUTCSeconds();
if (seconds < 10) {
seconds = '0' + seconds;
}
var milliseconds = date.getUTCMilliseconds();
if (milliseconds < 10) {
milliseconds = '00' + milliseconds;
} else if (milliseconds < 100) {
milliseconds = '0' + milliseconds;
}
TIME_FORMAT = hours + ':' + minutes + ':' + seconds + ',' + milliseconds;
console.log(TIME_FORMAT);
Mon Mar 20 2023 07:42:33 GMT+0300 (Moscow Standard Time)
(new Date(1679287353711))
.toISOString() // "2023-03-20T04:42:33.711Z"
.substring(11, 23) // "04:42:33.711"
;