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