summaryrefslogtreecommitdiffstats
path: root/chpass/util.c
diff options
context:
space:
mode:
authorGarrett Wollman <wollman@FreeBSD.org>1995-08-07 19:17:46 +0000
committerGarrett Wollman <wollman@FreeBSD.org>1995-08-07 19:17:46 +0000
commit4071e799547aef1aad5f8690453556d743f576b8 (patch)
tree2de7fc8de886f212b77a9fb886cd869a149fdd59 /chpass/util.c
parent2ae24df1326ff3e3e47c4957ef275d803d3c0eb5 (diff)
downloadpw-darwin-4071e799547aef1aad5f8690453556d743f576b8.tar.gz
pw-darwin-4071e799547aef1aad5f8690453556d743f576b8.tar.zst
pw-darwin-4071e799547aef1aad5f8690453556d743f576b8.zip
Delete bogus referneces to timezone code internal header file `tzfile.h',
which is no longer bogusly installed in /usr/include.
Diffstat (limited to 'chpass/util.c')
-rw-r--r--chpass/util.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/chpass/util.c b/chpass/util.c
index 8dfd388..fe89d79 100644
--- a/chpass/util.c
+++ b/chpass/util.c
@@ -43,7 +43,6 @@ static char sccsid[] = "@(#)util.c 8.4 (Berkeley) 4/2/94";
#include <stdlib.h>
#include <string.h>
#include <time.h>
-#include <tzfile.h>
#include <unistd.h>
#include "chpass.h"
@@ -64,7 +63,7 @@ ttoa(tval)
if (tval) {
tp = localtime(&tval);
(void)sprintf(tbuf, "%s %d, %d", months[tp->tm_mon],
- tp->tm_mday, tp->tm_year + TM_YEAR_BASE);
+ tp->tm_mday, tp->tm_year + 1900);
}
else
*tbuf = '\0';
@@ -109,10 +108,10 @@ atot(p, store)
if (day < 1 || day > 31 || month < 1 || month > 12 || !year)
goto bad;
if (year < 100)
- year += TM_YEAR_BASE;
- if (year <= EPOCH_YEAR)
+ year += 1900;
+ if (year <= 1970)
bad: return (1);
- lt->tm_year = year - TM_YEAR_BASE;
+ lt->tm_year = year - 1900;
lt->tm_mon = month - 1;
lt->tm_mday = day;
lt->tm_hour = 0;