From: Keith Bostic Date: Sun, 10 Sep 1989 06:33:49 +0000 (-0800) Subject: changes from Arthur Olson -- if TZ wrong, just use UTC X-Git-Tag: BSD-4_3_Reno-Snapshot-Development~5374 X-Git-Url: https://git.subgeniuskitty.com/unix-history/.git/commitdiff_plain/de716a997e6eca4309e0436ea9027f8d3fbebfd6?hp=c63e96302739f53bb833a6b183ba97e9e529f5f1 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 --- 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(); }