X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/5f80fdd1ec6888f34af829208fd90fb9716ac289..7e7070820f92e624493d958f44c2bc3787ad48f7:/sbr/dtime.c diff --git a/sbr/dtime.c b/sbr/dtime.c index 8de4b69c..3a37fe35 100644 --- a/sbr/dtime.c +++ b/sbr/dtime.c @@ -376,10 +376,10 @@ dtimezone (int offset, int flags) #endif } -#if defined(DSTXXX) +#ifdef ADJUST_NUMERIC_ONLY_TZ_OFFSETS_WRT_DST if (flags & TW_DST) hours += 1; -#endif /* defined(DSTXXX) */ +#endif /* ADJUST_NUMERIC_ONLY_TZ_OFFSETS_WRT_DST */ snprintf (buffer, sizeof(buffer), "%s%02d%02d", offset < 0 ? "-" : "+", abs (hours), abs (mins)); return buffer; @@ -412,8 +412,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);