commit b4dccc88a294329f0e5fde4b482d6385366d1adf
parent 68e3634600c8f47b0ddec3c1b87e0330d8d3b8e7
Author: pyratebeard <root@pyratebeard.net>
Date: Thu, 14 Jan 2021 10:22:49 +0000
add '-D FMT' for busybox to convert date correctly
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pyratelog.sh b/pyratelog.sh
@@ -6,7 +6,7 @@ function initialise() {
for md in ${find_md} ; do
input=$(echo ${md} | cut -f2 -d '/' | cut -f1 -d '.')
input_date=$(echo ${input} | cut -f1 -d '-' )
- input_date=$(date -d ${input_date} +%Y\ %m\ %d)
+ input_date=$(date -d ${input_date} -D "%Y%m%d" +%Y\ %m\ %d)
input_title=$(echo ${input} | cut -f2 -d '-' | sed 's/_/\ /g')
input_link="<li><a class="index" href='content/${input}.html'>${input_date} - ${input_title}</a></li>"