summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorLeif Johansson <leifj@sunet.se>2016-03-18 12:06:54 +0100
committerLeif Johansson <leifj@sunet.se>2016-03-18 12:06:54 +0100
commita1d9696a14711245830990da69b094779e03244b (patch)
treec02e05fe9796720bb3caf09c78c319177c6a970b /scripts
parentd5a90365d5c93570dc8d50538c20c1f87474cb2c (diff)
cleanup, implement PublicationInfo and remove saml-md-tool dependency
Diffstat (limited to 'scripts')
-rw-r--r--scripts/now_date.pl7
-rw-r--r--scripts/unique_id.pl7
2 files changed, 14 insertions, 0 deletions
diff --git a/scripts/now_date.pl b/scripts/now_date.pl
new file mode 100644
index 00000000..1a5e6890
--- /dev/null
+++ b/scripts/now_date.pl
@@ -0,0 +1,7 @@
+#!/usr/bin/env perl
+
+use Date::Calc qw/Today_and_Now/;
+
+($year,$month,$day,$hour,$min,$sec) = Today_and_Now();
+my $date = sprintf "%s-%02d-%02dT%02d:%02d:%02dZ",$year,$month,$day,$hour,$min,$sec;
+print $date;
diff --git a/scripts/unique_id.pl b/scripts/unique_id.pl
new file mode 100644
index 00000000..d4837f24
--- /dev/null
+++ b/scripts/unique_id.pl
@@ -0,0 +1,7 @@
+#!/usr/bin/env perl
+
+use Date::Calc qw/Today_and_Now/;
+
+($year,$month,$day,$hour,$min,$sec) = Today_and_Now();
+print sprintf "_%s%02d%02dT%02d%02d%02dZ",$year,$month,$day,$hour,$min,$sec;
+