I'm trying to get the date command to print the date and time formatted like this:
Code: Select all
Wednesday, January 4, 2017 1312 PST
using this command:
Code: Select all
/bin/date --date= '+%_A, %B %-d, %Y %H%M %Z'
however, it fails to provide the current time:
Code: Select all
Wednesday, January 4, 2017 0000 PST
When I ussue the 'date' command without any optional formating, it works correctly:
The shell TZ veriable is set:
The 'locale' command shows the LC_TIME is set:
However, the $LC_TIME shell verable is unset. When I set it as above, it still fails to display the time.
I've read the man page, the info page, and the strftime man page, but am still unable to grasp what I'm doing incorrectly.
Perhaps someone will be good enough to execute this command:
Code: Select all
/bin/date --date= '+%_A, %B %-d, %Y %H%M %Z'
and see if it will print the time on your machine. All clues appreciated.
ADVthanksANCE