Easiest solution is with Date() in 1 Line.
For the offset variable you just calc the difference between UTCHours and Hours of User-> then you add this offset* 60 * 60 * 1000 to seconds which you for example get from Firebase. This way you can get the right Date+Time
let offset = new Date().getHours() - new Date().getUTCHours()//this after seconds: + offset * 60 * 60 * 1000
let year = new Date(item.creation.seconds * 1000).toISOString().slice(2, 4)
let month = new Date(item.creation.seconds * 1000 + offset * 60 * 60 * 1000).toISOString().slice(5, 7)
let day = new Date(item.creation.seconds * 1000 + offset * 60 * 60 * 1000).toISOString().slice(8, 10)
let time = new Date(item.creation.seconds * 1000 + offset * 60 * 60 * 1000).toISOString().slice(11, 16)
let endvalue = month + "." + day + "." + year + " " + time
setdate(endvalue)