Timestamp problem
Hi there!
I'm using Timestamp from the time-utilities (latest) to convert a duration in milliseconds to a timestamp like this:
However the timestamp returned is always exactly 1 hour more than the actual duration, why could be that?
eg: the duration 255085 should be 4 minutes 15 seconds, but the timestamp returned is 01:04:15
Tried to log a sample duration of 100 minutes and that also returned 02:40:00..
2 Replies
Timezone, you need to compensate for it, I think
Date.UTC(status.currentTrack.duration)
will do the trickhm.. now it just shows 01:00:00 😄
for a duration of 222275 (3:42)
isn't the problem to begin with that I pass in a duration of milliseconds instead of a Date object..?