changes from Arthur Olson -- if TZ wrong, just use UTC
authorKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Sun, 10 Sep 1989 06:33:49 +0000 (22:33 -0800)
committerKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Sun, 10 Sep 1989 06:33:49 +0000 (22:33 -0800)
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
usr/src/lib/libc/gen/ctime.c

index e3c283c..5580fbd 100644 (file)
@@ -16,7 +16,7 @@
 .\" IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
 .\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
 .\"
 .\" 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
 .\"
 .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,
 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
 .PP
 .I Tzsetwall
 sets things up so that
index 3c34070..ed13de1 100644 (file)
@@ -19,7 +19,7 @@
  */
 
 #if defined(LIBC_SCCS) && !defined(lint)
  */
 
 #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 */
 
 /*
 #endif /* LIBC_SCCS and not lint */
 
 /*
@@ -689,7 +689,7 @@ const int                   lastditch;
                        return -1;
        }
        if (*name == '\0')
                        return -1;
        }
        if (*name == '\0')
-               stdoffset = 0;
+               return -1;
        else {
                name = getoffset(name, &stdoffset);
                if (name == NULL)
        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) 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();
 }
 
        settzname();
 }