From de606c8e87a7a339819ea4ef708b5a56d1f74013 Mon Sep 17 00:00:00 2001 From: wizarot Date: Tue, 26 Feb 2019 11:09:53 +0800 Subject: [PATCH] date: add Chinese translation --- pages.zh/osx/date.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 pages.zh/osx/date.md diff --git a/pages.zh/osx/date.md b/pages.zh/osx/date.md new file mode 100644 index 000000000..25271c833 --- /dev/null +++ b/pages.zh/osx/date.md @@ -0,0 +1,19 @@ +# date + +> 设置或显示系统日期 + +- 使用默认区域设置的格式显示当前日期 : + +`date +"%c"` + +- 以 UTC 和 ISO 8601 格式显示当前日期: + +`date -u +"%Y-%m-%dT%H:%M:%SZ"` + +- 将当前日期显示为unix时间戳(自1970-01-01 00:00:00以来的秒数) + +`date +%s` + +- 使用默认格式显示特定日期(格式化指定UNIX时间戳): + +`date -r 1473305798`