diff --git a/bb.sh b/bb.sh index 5381d6d..3e89977 100755 --- a/bb.sh +++ b/bb.sh @@ -361,8 +361,8 @@ get_html_file_content() { # leave empty for default behavior (edit only text part and change name) edit() { # Original post timestamp - edit_timestamp="$(LC_ALL=$date_locale date -r "${1%%.*}.html" +"%a, %d %b %Y %H:%M:%S %z" )" - touch_timestamp="$(LC_ALL=$date_locale date -r "${1%%.*}.html" +'%Y%m%d%H%M')" + edit_timestamp="$(LC_ALL=C date -r "${1%%.*}.html" +"%a, %d %b %Y %H:%M:%S %z" )" + touch_timestamp="$(LC_ALL=C date -r "${1%%.*}.html" +'%Y%m%d%H%M')" if [ "$2" = "full" ]; then $EDITOR "$1" filename="$1" @@ -836,8 +836,8 @@ make_rss() { echo '' >> "$rssfile" echo ''$global_title''$global_url'' >> "$rssfile" echo ''$global_description'en' >> "$rssfile" - echo ''$(LC_ALL=$date_locale date +"%a, %d %b %Y %H:%M:%S %z")'' >> "$rssfile" - echo ''$(LC_ALL=$date_locale date +"%a, %d %b %Y %H:%M:%S %z")'' >> "$rssfile" + echo ''$(LC_ALL=C date +"%a, %d %b %Y %H:%M:%S %z")'' >> "$rssfile" + echo ''$(LC_ALL=C date +"%a, %d %b %Y %H:%M:%S %z")'' >> "$rssfile" echo '' >> "$rssfile" n=0 @@ -852,7 +852,7 @@ make_rss() { echo "]]>$global_url/$i" >> "$rssfile" echo "$global_url/$i" >> "$rssfile" echo "$global_author" >> "$rssfile" - echo ''$(LC_ALL=$date_locale date -r "$i" +"%a, %d %b %Y %H:%M:%S %z")'' >> "$rssfile" + echo ''$(LC_ALL=C date -r "$i" +"%a, %d %b %Y %H:%M:%S %z")'' >> "$rssfile" n=$(( $n + 1 )) done @@ -959,11 +959,11 @@ rebuild_all_entries() { get_html_file_content 'text' 'text' <$i >> "$contentfile" # Original post timestamp - timestamp="$(LC_ALL=$date_locale date -r $i +"%a, %d %b %Y %H:%M:%S %z" )" + timestamp="$(LC_ALL=C date -r $i +"%a, %d %b %Y %H:%M:%S %z" )" create_html_page "$contentfile" "$i.rebuilt" no "$title" "$timestamp" # keep the original timestamp! - timestamp="$(LC_ALL=$date_locale date -r $i +'%Y%m%d%H%M')" + timestamp="$(LC_ALL=C date -r $i +'%Y%m%d%H%M')" mv "$i.rebuilt" "$i" chmod 644 "$i" touch -t $timestamp "$i"