diff options
author | ru <ru@FreeBSD.org> | 2001-03-02 16:19:49 +0000 |
---|---|---|
committer | ru <ru@FreeBSD.org> | 2001-03-02 16:19:49 +0000 |
commit | a79ec4865fc9fdfd8362a7fb93be50e7ff00c4f9 (patch) | |
tree | fbf4ab1916b254beed9bfe799da63711922ee014 /bin/pax/gen_subs.c | |
parent | bf6a51f986853bb37473a9d45dd719e6f5a8cf1b (diff) | |
download | FreeBSD-src-a79ec4865fc9fdfd8362a7fb93be50e7ff00c4f9.zip FreeBSD-src-a79ec4865fc9fdfd8362a7fb93be50e7ff00c4f9.tar.gz |
POSIX wrote:
: LC_TIME This variable shall determine the format and
: contents of date and time strings when the -v
: option is specified.
Developers took this wrong. LC_TIME specifies the locale
name, not the ``format'' argument of strftime().
Oops:
pax -w -f /tmp/foo /dev/null
LC_TIME=de_DE.ISO_8859-1 pax -v -f /tmp/foo
Diffstat (limited to 'bin/pax/gen_subs.c')
-rw-r--r-- | bin/pax/gen_subs.c | 32 |
1 files changed, 11 insertions, 21 deletions
diff --git a/bin/pax/gen_subs.c b/bin/pax/gen_subs.c index 83cfdc5..bd04aa8 100644 --- a/bin/pax/gen_subs.c +++ b/bin/pax/gen_subs.c @@ -106,17 +106,13 @@ ls_list(arcn, now) sbp = &(arcn->sb); strmode(sbp->st_mode, f_mode); - if (ltmfrmt == NULL) { - /* - * no locale specified format. time format based on age - * compared to the time pax was started. - */ - if ((sbp->st_mtime + SIXMONTHS) <= now) - timefrmt = OLDFRMT; - else - timefrmt = CURFRMT; - } else - timefrmt = ltmfrmt; + /* + * time format based on age compared to the time pax was started. + */ + if ((sbp->st_mtime + SIXMONTHS) <= now) + timefrmt = OLDFRMT; + else + timefrmt = CURFRMT; /* * print file mode, link count, uid, gid and time @@ -178,16 +174,10 @@ ls_tty(arcn) char f_mode[MODELEN]; char *timefrmt; - if (ltmfrmt == NULL) { - /* - * no locale specified format - */ - if ((arcn->sb.st_mtime + SIXMONTHS) <= time((time_t *)NULL)) - timefrmt = OLDFRMT; - else - timefrmt = CURFRMT; - } else - timefrmt = ltmfrmt; + if ((arcn->sb.st_mtime + SIXMONTHS) <= time((time_t *)NULL)) + timefrmt = OLDFRMT; + else + timefrmt = CURFRMT; /* * convert time to string, and print |