configure/genstamp: check for struct tm.tm_gmtoff
[citadel.git] / citadel / genstamp.c
index 8915afa88ee6e5befa9845053915a6de3767a751..5048ca6706f5764301d5c787a5e4cea07308da78 100644 (file)
@@ -51,7 +51,11 @@ void datestring(char *buf, time_t xtime, int which_format) {
        t = localtime(&xtime);
 
        /* Convert "seconds west of GMT" to "hours/minutes offset" */
+#ifdef HAVE_STRUCT_TM_TM_GMTOFF
        offset = t->tm_gmtoff;
+#else
+       offset = timezone;
+#endif
        if (offset > 0) {
                offsign = '-';
        }