1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

[小ネタ]Unix timestamp milliseconds を MacOS X で取得する

Posted at

よく忘れるのでメモ。
以下のリンクにまとまっていました。

How do I get current Unix time in milliseconds using bash?

Node.js であれば以下。

$node -e 'console.log(Date.now())'
1506861452421

bashであれば$(command)によってコマンド置換できるので以下のように使える。

$aws logs put-log-events --log-group-name "xxxx" --log-stream-name "App1" --log-events timestamp=$(node -e 'console.log(Date.now())'),message='Hello ' --sequence-token xxxxx
1
1
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
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?