LoginSignup
13
10

More than 5 years have passed since last update.

bash でUNIX時間を出力するメモ(エポックミリ秒)

Posted at

現在のUNIX時間(エポックミリ秒)を出力

$ date +%s%3N
1496918153734

UNIX時間(エポックミリ秒)から ISO 8601 形式の UTC 時刻を出力

エポックミリ秒の末尾 3桁の手前にドットを付加する(エポック秒以降に小数点を入れる)

$ date "+%Y-%m-%dT%H:%M:%S.%3NZ" --utc -d @1496918153.734
2017-06-07T22:35:53.734Z
13
10
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
13
10