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

ISO 8601形式でUTCの現在時刻をサクッと表示する方法(with Docker)

More than 1 year has passed since last update.

macOSのdateコマンドにISO 8601形式で表示するオプションがなかったので、Dockerのbusyboxイメージを使って現在時刻を表示します。
Dockerを使うことで、ポータビリティを高めます。

なお、busyboxなのでUTCでの表示になります。

docker run busybox date -Iseconds
実行結果(UTC)
2019-02-22T08:59:10+0000

追記

-I オプションを使わない場合はこちら。

docker run busybox date "+%Y-%m-%dT%H:%M:%S%z"
notakaos
東京在住のWeb Developer
yumemi
みんなが知ってるあのサービス、実はゆめみが作ってます。スマホアプリ/Webサービスの企画・UX/UI設計、開発運用。Swift, Kotlin, PHP, Vue.js, React.js, Node.js, AWS等エンジニア・クリエイターの会社です。東京(三軒茶屋)/京都(四条烏丸)/札幌/大阪/福岡に展開中!Twitterで情報配信中https://twitter.com/yumemiinc
http://www.yumemi.co.jp
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
ユーザーは見つかりませんでした