I have a time represented as seconds since 1970-01-01 00:00:00 UTC, like 1524884843
.
I want to get the time, say, 1 month from the above specified time.
Normally if I want to get the time 1 month from now, I can use...
root@beaglebone:~/bbbrtc# date
Sat Apr 28 03:12:54 UTC 2018
root@beaglebone:~/bbbrtc# date -d "now+1 month"
Mon May 28 03:12:57 UTC 2018
I can also specify an epoch seconds time in the -d
argument by prefixing it with an @
as in....
root@beaglebone:~/bbbrtc# date -d "@1524884843"
Sat Apr 28 03:07:23 UTC 2018
However when I try to combine an @
prefixed epoch time with a calculation, I get an error...
root@beaglebone:~/bbbrtc# date -d "@1524884843+1 month"
date: invalid date `@1524884843+1 month'
What is the correct syntax for combining an epoch time with a relative calculation?