I am following these instructions https://stackoverflow.com/a/15012173/3808307
but I really don't get it. Now it is June 4th in my time zone and in UTC
I am doing timeRef.current = new Date()
Then
console.log(timeRef.current.getUTCFullYear()) // returns 2020
console.log(timeRef.current.getUTCMonth()) // returns 5
Why is my month 5? How can I get YYYYMMDD-HHMMSS.milliseconds in UTC univocally?
I don't want to have errors when, for example, it's Feb 29th, like here Javascript date - setting UTC month
I need a precise way of converting
Thank you