From e1a917b9f2db8ea62d90944739d7a9071fbc8f81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucio=20Andr=C3=A9s=20Illanes=20Albornoz?= Date: Thu, 9 Apr 2020 21:03:34 +0100 Subject: subr/rtl.subr:rtl_date(): default ${DEFAULT_TIMESTAMP_FMT} to "%Y/%m/%d %H:%M:%S". --- subr/rtl.subr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'subr') diff --git a/subr/rtl.subr b/subr/rtl.subr index ef9d63ea..103d6d5d 100644 --- a/subr/rtl.subr +++ b/subr/rtl.subr @@ -3,7 +3,7 @@ # rtl_basename() { local _fname="${1##*/}"; printf "%s" "${_fname}"; }; -rtl_date() { command date "+${1:-${DEFAULT_TIMESTAMP_FMT}}"; }; +rtl_date() { command date "+${1:-${DEFAULT_TIMESTAMP_FMT:-"%Y/%m/%d %H:%M:%S"}}"; }; rtl_set_var_unsafe() { [ -n "${2}" ] && eval ${1}=\"${2}\" || return 0; }; rtl_test_cmd() { command -v "${1}" >/dev/null; }; rtl_uniq() { if [ "${#}" -gt 0 ]; then printf "%s" "${*}" | sed 's/ /\n/g' | awk '!x[$0]++' | paste -s -d" "; fi; }; -- cgit v1.2.3