Blame SOURCES/tftp-hpa-0.39-tzfix.patch

ecbeaa
diff -up tftp-hpa-0.49/tftpd/tftpd.c.tzfix tftp-hpa-0.49/tftpd/tftpd.c
ecbeaa
--- tftp-hpa-0.49/tftpd/tftpd.c.tzfix	2008-10-20 18:08:31.000000000 -0400
ecbeaa
+++ tftp-hpa-0.49/tftpd/tftpd.c	2008-11-25 11:45:27.000000000 -0500
ecbeaa
@@ -350,6 +350,14 @@ int main(int argc, char **argv)
ecbeaa
     const char *pidfile = NULL;
ecbeaa
     u_short tp_opcode;
ecbeaa
 
ecbeaa
+    time_t my_time = 0;
ecbeaa
+    struct tm* p_tm;
a36c7a
+    char envtz[22];
ecbeaa
+    my_time = time(NULL);
ecbeaa
+    p_tm = localtime(&my_time);
a36c7a
+    snprintf(envtz, sizeof(envtz), "UTC%+ld", (p_tm->tm_gmtoff * -1)/3600);
ecbeaa
+    setenv("TZ", envtz, 0);
ecbeaa
+
ecbeaa
     /* basename() is way too much of a pain from a portability standpoint */
ecbeaa
 
ecbeaa
     p = strrchr(argv[0], '/');