Help us understand the problem. What is going on with this article?

date コマンドで UTC な現在時刻を time zone designator を Z の iso8601 で出力

date コマンドで local time を iso8601 で表示すると

date --iso-8601="seconds"
2020-01-22T14:56:44+09:00

こんな感じ、time zone は日本だから +09:00

これを UTC で表示すると

date --iso-8601="seconds" --utc
2020-01-22T05:57:37+00:00

たしかに +00:00 なんだろうけどここは Z と出してほしい

echo `date '+%Y-%m-%dT%H:%M:%S' --utc`Z
2020-01-22T05:58:22Z

完成!

Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした