zwily/ec2-rotate-volume-snapshots — pull request #4 by xombiemp (2012-07-30 20:45:42+00:00)
Title: Add time period offsets to calculation

For each period we want to include the previous period's duration in
the calculation for when to delete snapshots.

For example, if we are saving 24 hours and 3 days, we don't want the
calculation for days to just be 3 days ago from the current time, we
want it to be 3 days ago from 24 hours ago.

To accomplish this, an offset has been added to the formula to include
the duration of the previous periods along with the current period's
duration.