From 82024fce9a7f2a78113aa2d6f458b5b1e92226c2 Mon Sep 17 00:00:00 2001 From: Marcela Mašláňová Date: Mar 25 2008 14:00:46 +0000 Subject: Use ISO format instead of posix. --- diff --git a/at.spec b/at.spec index 58e6c50..f08b0e9 100644 --- a/at.spec +++ b/at.spec @@ -6,7 +6,7 @@ Summary: Job spooling tools Name: at Version: 3.1.10 -Release: 22%{?dist} +Release: 23%{?dist} License: GPLv2+ Group: System Environment/Daemons URL: http://ftp.debian.org/debian/pool/main/a/at @@ -32,6 +32,7 @@ Patch14: at-3.1.10-pam_keyring.patch Patch15: at-3.1.10-PIE.patch Patch16: at-3.1.10-pamfix.patch Patch17: at-3.1.10-setuids.patch +Patch18: nonposix.patch BuildRequires: fileutils chkconfig /etc/init.d BuildRequires: flex bison autoconf @@ -83,6 +84,7 @@ cp %{SOURCE1} . %patch15 -p1 -b .PIE %patch16 -p1 -b .pamfix %patch17 -p1 -b .setuids +%patch18 -p1 -b .nonposix %build # patch10 touches configure.in @@ -185,6 +187,9 @@ fi %attr(4755,root,root) %{_bindir}/at %changelog +* Tue Mar 25 2008 Marcela Maslanova - 3.1.10-23 +- 436952 use local instead of posix output date/time format. + * Thu Feb 28 2008 Marcela Maslanova - 3.1.10-22 - #435250 mixed OPTS and OPTIONS variable in sysconfig diff --git a/nonposix.patch b/nonposix.patch new file mode 100644 index 0000000..ed6923d --- /dev/null +++ b/nonposix.patch @@ -0,0 +1,42 @@ +diff -up at-3.1.10/at.c.nonposix at-3.1.10/at.c +--- at-3.1.10/at.c.nonposix 2008-03-25 14:54:09.000000000 +0100 ++++ at-3.1.10/at.c 2008-03-25 14:57:46.000000000 +0100 +@@ -92,6 +92,7 @@ + #define SIZE 255 + + #define TIMEFORMAT_POSIX "%a %b %e %T %Y" ++#define TIMEFORMAT_ISO "%Y-%m-%d %H:%M" + #define TIMESIZE 50 + + enum { +@@ -490,7 +491,15 @@ writefile(time_t runtimer, char queue) + + runtime = localtime(&runtimer); + +- strftime(timestr, TIMESIZE, TIMEFORMAT_POSIX, runtime); ++ /* We only use the sick POSIX time format if POSIXLY_CORRECT ++ is set. Otherwise, we use ISO format. ++ */ ++ ++ if (getenv("POSIXLY_CORRECT") != NULL) { ++ strftime(timestr, TIMESIZE, TIMEFORMAT_POSIX, runtime); ++ } else { ++ strftime(timestr, TIMESIZE, TIMEFORMAT_ISO, runtime); ++ } + fprintf(stderr, "job %ld at %s\n", jobno, timestr); + + /* Signal atd, if present. Usual precautions taken... */ +@@ -588,8 +597,11 @@ list_jobs(void) + runtimer = 60 * (time_t) ctm; + runtime = localtime(&runtimer); + +- strftime(timestr, TIMESIZE, TIMEFORMAT_POSIX, runtime); +- ++ if (getenv("POSIXLY_CORRECT") != NULL) { ++ strftime(timestr, TIMESIZE, TIMEFORMAT_POSIX, runtime); ++ } else { ++ strftime(timestr, TIMESIZE, TIMEFORMAT_ISO, runtime); ++ } + if ((pwd = getpwuid(buf.st_uid))) + printf("%ld\t%s %c %s\n", jobno, timestr, queue, pwd->pw_name); + else