From de716a997e6eca4309e0436ea9027f8d3fbebfd6 Mon Sep 17 00:00:00 2001 From: Keith Bostic Date: Sat, 9 Sep 1989 22:33:49 -0800 Subject: [PATCH] changes from Arthur Olson -- if TZ wrong, just use UTC SCCS-vsn: lib/libc/gen/ctime.c 5.18 SCCS-vsn: lib/libc/gen/ctime.3 6.11 --- usr/src/lib/libc/gen/ctime.3 | 8 ++------ usr/src/lib/libc/gen/ctime.c | 6 +++--- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/usr/src/lib/libc/gen/ctime.3 b/usr/src/lib/libc/gen/ctime.3 index e3c283c8e8..5580fbd200 100644 --- a/usr/src/lib/libc/gen/ctime.3 +++ b/usr/src/lib/libc/gen/ctime.3 @@ -16,7 +16,7 @@ .\" IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED .\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. .\" -.\" @(#)ctime.3 6.10 (Berkeley) %G% +.\" @(#)ctime.3 6.11 (Berkeley) %G% .\" .TH CTIME 3 "" .SH NAME @@ -257,11 +257,7 @@ If the environment variable does not specify a .IR tzfile (5)-format and cannot be interpreted as a direct specification, -UTC is used with the standard time abbreviation set to -the value of the -.B TZ -environment variable -(or to the leading characters of its value if it is lengthy). +UTC is used. .PP .I Tzsetwall sets things up so that diff --git a/usr/src/lib/libc/gen/ctime.c b/usr/src/lib/libc/gen/ctime.c index 3c34070ce0..ed13de123a 100644 --- a/usr/src/lib/libc/gen/ctime.c +++ b/usr/src/lib/libc/gen/ctime.c @@ -19,7 +19,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char sccsid[] = "@(#)ctime.c 5.17 (Berkeley) %G%"; +static char sccsid[] = "@(#)ctime.c 5.18 (Berkeley) %G%"; #endif /* LIBC_SCCS and not lint */ /* @@ -689,7 +689,7 @@ const int lastditch; return -1; } if (*name == '\0') - stdoffset = 0; + return -1; else { name = getoffset(name, &stdoffset); if (name == NULL) @@ -903,7 +903,7 @@ tzset() (void) strcpy(lclptr->chars, GMT); } else if (tzload(name, lclptr) != 0) if (name[0] == ':' || tzparse(name, lclptr, FALSE) != 0) - (void) tzparse(name, lclptr, TRUE); + (void) gmtload(lclptr); settzname(); } -- 2.20.1