Summary
date -r <file> should return the file's modification time, but in bashkit it returns an empty/current timestamp instead.
Reproduction
touch /tmp/test.txt
date -r /tmp/test.txt +"%B %d, %Y"
# Expected: file's modification date
# Actual: empty or current time
Context
Discovered while running bashblog via bashkit CLI. Bashblog uses date -r extensively to:
- Read post timestamps:
LC_ALL=C date -r "$i" +"$date_format_full"
- Generate archive headers:
date -r "$i" +"$date_allposts_header"
- Format dates for RSS feed:
date -r "$i" +"$date_format_full"
Without this, all timestamps in the generated blog are empty.
Expected behavior
date -r <file> +<format> should stat the file on the VFS and format its modification time.
Summary
date -r <file>should return the file's modification time, but in bashkit it returns an empty/current timestamp instead.Reproduction
Context
Discovered while running bashblog via bashkit CLI. Bashblog uses
date -rextensively to:LC_ALL=C date -r "$i" +"$date_format_full"date -r "$i" +"$date_allposts_header"date -r "$i" +"$date_format_full"Without this, all timestamps in the generated blog are empty.
Expected behavior
date -r <file> +<format>should stat the file on the VFS and format its modification time.