OK, the line in question was
d=`LANG=C date -d $(DATE_VERSION) "+%B %-d, %Y"` ; \
I've written two scripts, one is combination of sed and awk:
echo DATE_VERSION | sed 's/\(....\)\(..\)\(..\)/\1 \2 \3 00 00 00/' |
LANG=C awk '{print (strftime ("%B %-d, %Y",
mktime ($0)))}'
and the other is in Guile:
(setlocale LC_ALL "C")
(display
(strftime "%B %-d, %Y"
(car (strptime "%Y%m%d" (cadr (program-arguments))))))
which will be invoked then something like this
guile date.scm DATE_VERSION
Which would be better to use?