Salı, Ocak 21, 2025

How to Calculate Correct Date in Bash

yüksek çözünürlüklü bash script uygulama görseliPin

Add 20 minutes to the current date.

date --date 'now +20 mins'
bash date correct way, bash tarih bakmaPin

Add 4 days 2 hours 14 mins from 2020-08-17 22:00:00

date --date "2020-08-17 22:00:00 4 days 2 hours 14 mins"
bash date, bash tarih düzenlemePin

Subtract 5 minutes from the current date.

date --date 'now -5 mins'
bash tarih hesaplama, bash date calculate, bash current datePin

Add 4 days 2 hours 14 minutes and return it in unixseconds.

date --date '2020-08-17 22:00:00 4 days 2 hours 14 mins' +%s
bash tarih, bash date, bash tricksPin

And subtract 4 days 2 hours 14 minutes and return it in unixseconds

date --date '2020-08-17 22:00:00 4 days ago 2 hours 14 mins' +%s
bash date, bash calculate date, bash date rangePin
Your Mastodon Instance