I am using the following script in order convert microSeconds in hh:mm using date-fns but I get the wrong formatting:
const microSeconds = 100000000
format(addMilliseconds(new Date(0), microSeconds / 1000), 'hh:mm')}
for example in this case I would need to get '00:01' but instead I get 01:01
Any idea how to fix it?
Runnable code https://stackblitz.com/edit/date-fns-playground-cdgduf