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

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