]> diplodocus.org Git - nmh/blobdiff - sbr/dtime.c
Correct first-line comments where filename is wrong.
[nmh] / sbr / dtime.c
index 066a72d74e444d272a9f7406fb7b85d7fc0d079c..52f3a79019c3c8eee1135322fdfce9fc6a184b14 100644 (file)
@@ -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