I am having some issues processing dates, where they are being interpreted in US format (mm-dd) instead of EU/AU format (dd-mm). It looks like
date isn't respecting my locale settings, or they are set incorrectly.
# This is correct, date read as US mm-dd-yy format $ LC_TIME="en_US" date +%Y-%m-%d -d 1/2/03 2003-01-02 # This is incorrect, dates are read as US mm-dd-yy instead of AU dd-mm-yyyy $ LC_TIME="en_AU" date +%Y-%m-%d -d 1/2/03 2003-01-02
The locale settings seem fine, as
date can produce the correct format:
$ LC_TIME="en_US" date +%x -d 2003-02-01 02/01/2003 $ LC_TIME="en_AU" date +%x -d 2003-02-01 01/02/03
Is this a bug in
date, or do you need to do something else to get it to respect the locale settings when reading short dates?