Necesito crear una marca de tiempo UTC que esté en formato ISO
Lo intenté:
new Date().getTime().toISOString();
Pero obtengo Uncaught TypeError: (intermediate value).getTime(...).toISOString is not a function
Uncaught TypeError: (intermediate value).getTime(...).toISOString is not a function
Simplemente puede hacer new Date().toISOString();
new Date().toISOString();
getTime() devuelve el número de milisegundos desde 1970, que es un número. toISOString() es un método del objeto Date . solo quieres new Date().toISOString() .
toISOString()
Date
new Date().toISOString()