X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/fea68d3492b2a433f0972986bf22a55f8f6158f2..ec68c7d9fca00e976df02842dc2c9d5a523567af:/sbr/dtime.c?ds=sidebyside diff --git a/sbr/dtime.c b/sbr/dtime.c index 066a72d7..52f3a790 100644 --- a/sbr/dtime.c +++ b/sbr/dtime.c @@ -1,6 +1,4 @@ - -/* - * dtime.c -- time/date routines +/* dtime.c -- time/date routines * * This code is Copyright (c) 2002, by the authors of nmh. See the * COPYRIGHT file in the root directory of the nmh distribution for @@ -41,12 +39,6 @@ char *tw_ldotw[] = { "Saturday", NULL }; -struct zone { - char *std; - char *dst; - int shift; -}; - static int dmsize[] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }; @@ -108,7 +100,14 @@ dlocaltime (time_t *clock) if (tm->tm_isdst) /* if DST is in effect */ tw.tw_zone -= 60; /* reset to normal offset */ #else - tzset(); + { + static bool deja_vu; + + if (!deja_vu) { + deja_vu = true; + tzset(); + } + } tw.tw_zone = -(timezone / 60); #endif