ls(1): Return previous long format for C/POSIX locales
authorJohn Marino <draco@marino.st>
Fri, 20 Nov 2015 15:32:52 +0000 (16:32 +0100)
committerJohn Marino <draco@marino.st>
Fri, 20 Nov 2015 15:43:15 +0000 (16:43 +0100)
commitd442878585e8994c8f2ee02005999fbd8f769987
treefc95c4d4b9c3132a61e8eb6431f5f0bfdd2c2e42
parentd6571938f2980a4084fe36f604af18ab7823a219
ls(1): Return previous long format for C/POSIX locales

The output of ls -l for POSIX locales is covered by the POSIX standard.
The previous implementation was not compliance with the handling of
future timestamps.  The standard requires that future timestamps always
show the year where as previously it would only show the year if the
file's modification time was less than 6 months into the future.

This change detects if C/POSIX LC_TIME is specified, and if so, it
implements the long format as specified by the POSIX standard.  The
ISO 8601 format is still used for named locales.

Reported by: swildner
bin/ls/ls.1
bin/ls/print.c