Add some specific time while using the linux command “date”

前端 未结 7 979
误落风尘
误落风尘 2021-01-07 20:18

In linux, date can help me to print the current time. If want to print the current time + 1 hour, what option should I give?

7条回答
  •  悲&欢浪女
    2021-01-07 20:29

    In Linux shell script to add 1 hour or 60 minutes.

    dt=$(date -d '+ 60 minutes'  '+%FT%T.000Z')
    

提交回复
热议问题