aboutsummaryrefslogtreecommitdiff
path: root/utils/rr-to-json-date
diff options
context:
space:
mode:
Diffstat (limited to 'utils/rr-to-json-date')
-rwxr-xr-xutils/rr-to-json-date12
1 files changed, 12 insertions, 0 deletions
diff --git a/utils/rr-to-json-date b/utils/rr-to-json-date
new file mode 100755
index 0000000..ffbfabe
--- /dev/null
+++ b/utils/rr-to-json-date
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+DATE_ARG="$@"
+
+if [ -z "$DATE_ARG" ]; then
+ while read inpt; do
+ DATE_ARG="$inpt"
+ break
+ done
+fi
+
+eval -- date -d \"$DATE_ARG\" +\"%FT%T.000Z\"