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.
给定一个 Unix 时间,例如 1551996855(2019 年 3 月 7 日星期四 22:14:15 +0000),如何仅转换和提取 HH:MM, (22:14)?
您可以date用于转换并指定+%H:%M为格式:
date
+%H:%M
date -d @$"1551996855" +%H:%M
-d