diff options
Diffstat (limited to 'metadata/scripts/expiration_date.pl')
-rwxr-xr-x | metadata/scripts/expiration_date.pl | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/metadata/scripts/expiration_date.pl b/metadata/scripts/expiration_date.pl new file mode 100755 index 00000000..cf297c5f --- /dev/null +++ b/metadata/scripts/expiration_date.pl @@ -0,0 +1,11 @@ +#!/usr/bin/env perl + +use Date::Calc qw/Today_and_Now Add_Delta_Days/; +my $delta = $ARGV[0]; +$delta = 30 unless $delta; + +($year,$month,$day,$hour,$min,$sec) = Today_and_Now(); +($year,$month,$day) = Add_Delta_Days($year,$month,$day,$delta); +my $date = sprintf "%s-%02d-%02dT%02d:%02d:%02dZ",$year,$month,$day,$hour,$min,$sec; +print $date; + |