Pregunta

I have the following string "2012-09-04T00:11:20.000Z" I need to convert this string to timestamp with ash shell.

How to do it?

¿Fue útil?

Solución

You can try this :

date -d "2012-09-04T00:11:20.000Z" "+%s"

-d str : Set time described by str

%s : Timestamp format

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top