Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有以下字符串“2012-09-04T00:11:20.000Z”我需要将此字符串转换为带有 ash shell 的时间戳。
怎么做?
你可以试试这个:
date -d "2012-09-04T00:11:20.000Z" "+%s"
-d str:设置由 str 描述的时间
%s : 时间戳格式