X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/c703902741e0f7ce55f87e48ef0d00901195f1bc..0e52f41f67c1f9699861f3d7aa5dbbcdbb428c3e:/sbr/dtime.c diff --git a/sbr/dtime.c b/sbr/dtime.c index acab8774..89f5dde8 100644 --- a/sbr/dtime.c +++ b/sbr/dtime.c @@ -108,7 +108,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 @@ -232,9 +239,9 @@ dtime (time_t *clock, int alpha_timezone) if (alpha_timezone) /* use alpha-numeric timezones */ return dasctime (dlocaltime (clock), TW_NULL); - else - /* use numeric timezones */ - return dasctime (dlocaltime (clock), TW_ZONE); + + /* use numeric timezones */ + return dasctime (dlocaltime (clock), TW_ZONE); }