AaronV77/rm_backup

The Difference between two times.

Closed this issue · 1 comments

The ability to take the difference between to dates and know when the file needs to be removed is going to be a challenge. The challenge is the overlap of the days, months, and years. The way that I’m doing it now is wrong and does not account for the overlap.

After googling it, taking the difference between the two EPOCH times to get the total number of seconds would be easier. I think in the setup script when taking in the duration, convert everything to seconds and if the difference of the two times is greater than the total then remove the item.