diff options
author | Jim Meyering <jim@meyering.net> | 1994-07-05 02:22:12 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1994-07-05 02:22:12 +0000 |
commit | 53cd09b3bc2052322cd4d7defe6853e5211d8e27 (patch) | |
tree | 73149cebb9cca9bf5b0c5ad22da04c19d204f68f | |
parent | 792d894bd907cb2538dab605270a84e073f76984 (diff) | |
download | coreutils-53cd09b3bc2052322cd4d7defe6853e5211d8e27.tar.xz |
merge with 1.10d
-rw-r--r-- | old/sh-utils/ChangeLog | 9 | ||||
-rw-r--r-- | src/date.c | 19 |
2 files changed, 12 insertions, 16 deletions
diff --git a/old/sh-utils/ChangeLog b/old/sh-utils/ChangeLog index 1d2c2f6b1..a6a94037e 100644 --- a/old/sh-utils/ChangeLog +++ b/old/sh-utils/ChangeLog @@ -1,3 +1,12 @@ +Sun Jul 03 08:44:00 1994 Jim Meyering (meyering@comco.com) + + * configure.in [AC_HAVE_HEADERS]: Add sys/param.h, for + definition of HAVE_SYS_PARAM_H, now tested in pathmax.h. + + * configure.in [AC_WORDS_BIGENDIAN]: Add it. This macro is + required by memcmp.c on big-endian systems. Its absence was + diagnosed by Lars Duening (duening@ibr.cs.tu-bs.de). + Sun Jun 19 00:18:06 1994 Jim Meyering (meyering@comco.com) * nice.c (main): Accept options like `--5' (equivalent to `-n -5') diff --git a/src/date.c b/src/date.c index 69e866574..75e7efb7b 100644 --- a/src/date.c +++ b/src/date.c @@ -68,7 +68,6 @@ size_t strftime (); time_t time (); #endif -int putenv (); int stime (); char *xrealloc (); @@ -79,19 +78,11 @@ void error (); static void show_date (); static void usage (); -/* putenv string to use Universal Coordinated Time. - POSIX.2 says it should be "TZ=UCT0" or "TZ=GMT0". */ -#ifndef TZ_UCT -#if defined(hpux) || defined(__hpux__) || defined(ultrix) || defined(__ultrix__) || defined(USG) -#define TZ_UCT "TZ=GMT0" -#else -#define TZ_UCT "TZ=" -#endif -#endif - /* The name this program was run with, for error messages. */ char *program_name; +static int universal_time = 0; + /* If non-zero, display usage information and exit. */ static int show_help; @@ -118,7 +109,6 @@ main (argc, argv) char *datestr = NULL; time_t when; int set_date = 0; - int universal_time = 0; program_name = argv[0]; @@ -154,9 +144,6 @@ main (argc, argv) if (argc - optind > 1) usage (1); - if (universal_time && putenv (TZ_UCT) != 0) - error (1, 0, "virtual memory exhausted"); - time (&when); if (datestr) @@ -195,7 +182,7 @@ show_date (format, when) char *out = NULL; size_t out_length = 0; - tm = localtime (&when); + tm = (universal_time ? gmtime : localtime) (&when); if (format == NULL) /* Print the date in the default format. Vanilla ANSI C strftime |