File tftp-hpa-0.48-tzfix.patch of Package tftp.import4783
Index: tftp-hpa-git-0.48/tftpd/tftpd.c
===================================================================
--- tftp-hpa-git-0.48.orig/tftpd/tftpd.c
+++ tftp-hpa-git-0.48/tftpd/tftpd.c
@@ -350,6 +350,14 @@ int main(int argc, char **argv)
#endif
u_short tp_opcode;
+ time_t my_time = 0;
+ struct tm* p_tm;
+ char envtz[10];
+ my_time = time(NULL);
+ p_tm = localtime(&my_time);
+ snprintf(envtz, sizeof(envtz) - 1, "UTC%+d", (p_tm->tm_gmtoff * -1)/3600);
+ setenv("TZ", envtz, 0);
+
/* basename() is way too much of a pain from a portability standpoint */
p = strrchr(argv[0], '/');