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