summaryrefslogtreecommitdiff
path: root/scripts/functions
diff options
context:
space:
mode:
authorTitus von Boxberg <tvb377@gmx.de>2010-02-02 23:24:24 (GMT)
committerTitus von Boxberg <tvb377@gmx.de>2010-02-02 23:24:24 (GMT)
commitf65b10457b2268edf2487ca40269779425e0b7b0 (patch)
tree2e6da2e81614daf6ee8077cd64241755f08fdd13 /scripts/functions
parente6f4c47c21b9ac09cb0e56810ea2e27b47645a35 (diff)
scripts/functions: fix date munging when ns are not available
On some systems (eg. *BSD and Darwin), date does not support nanoseconds (%N) precision. Instead of printing '%N' in this case, it just prints 'N'. Fix the sed expression to handle this case.
Diffstat (limited to 'scripts/functions')
-rw-r--r--scripts/functions2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/functions b/scripts/functions
index 18915ee..87a6bdb 100644
--- a/scripts/functions
+++ b/scripts/functions
@@ -192,7 +192,7 @@ CT_Which() {
# to the highest entire second
# Usage: CT_DoDate <fmt>
CT_DoDate() {
- date "$1" |sed -r -e 's/%N$/000000000/;'
+ date "$1" |sed -r -e 's/N$/000000000/;'
}
CT_STEP_COUNT=1