3
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 1 year has passed since last update.

Mac(zsh)でdateコマンドで任意日付のUnixTime(エポック秒)を操作する

Last updated at Posted at 2023-02-02

指定した時刻のUNIX時間(エポック秒)を出力

$ date -jf "%Y/%m/%d %H:%M:%S" "2023/02/14 23:59:59" +%s
1676386799

指定したUNIX時間(エポック秒)をフォーマットして出力

$ date -jr 1676386799 +"%Y/%m/%d %H:%M:%S"
2023/02/14 23:59:59
3
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
3
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?