X-Git-Url: http://git.marmaro.de/?a=blobdiff_plain;ds=sidebyside;f=sbr%2Fdtime.c;h=8cb4c799d36108fe0e1c4284a1ce161fd200c85d;hb=c79c37f2b6e647212c36b63841a4628af01c774a;hp=57b61c8824f8573177bd6c32682c94c55154bc8c;hpb=da12435096e47ec1d362215141fc8b21f24e5e01;p=mmh diff --git a/sbr/dtime.c b/sbr/dtime.c index 57b61c8..8cb4c79 100644 --- a/sbr/dtime.c +++ b/sbr/dtime.c @@ -3,13 +3,17 @@ * dtime.c -- time/date routines * * $Id$ + * + * This code is Copyright (c) 2002, by the authors of nmh. See the + * COPYRIGHT file in the root directory of the nmh distribution for + * complete copyright information. */ #include /* for snprintf() */ #include #include -#if !defined(HAVE_TM_GMTOFF) && !defined(HAVE_TZSET) +#if !defined(HAVE_STRUCT_TM_TM_GMTOFF) && !defined(HAVE_TZSET) # include #endif @@ -24,7 +28,7 @@ # endif #endif -#if !defined(HAVE_TM_GMTOFF) && defined(HAVE_TZSET) +#if !defined(HAVE_STRUCT_TM_TM_GMTOFF) && defined(HAVE_TZSET) extern int daylight; extern long timezone; extern char *tzname[]; @@ -138,7 +142,7 @@ dlocaltime (time_t *clock) static struct tws tw; struct tm *tm; -#if !defined(HAVE_TM_GMTOFF) && !defined(HAVE_TZSET) +#if !defined(HAVE_STRUCT_TM_TM_GMTOFF) && !defined(HAVE_TZSET) struct timeb tb; #endif @@ -412,8 +416,11 @@ dmktime (struct tws *tw) year = tw->tw_year; result = 0; - if (year < 100) - year += 1900; + if (year < 1970) + year += 1900; + + if (year < 1970) + year += 100; for (i = 1970; i < year; i++) result += dysize (i);