문제

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?

도움이 되었습니까?

해결책

You can try this :

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

-d str : Set time described by str

%s : Timestamp format

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top