openbsd-ports/sysutils/syslog-ng/patches/patch-src_macros_c
jakob f977887744 update to v1.6.4
drop development version
2004-06-19 22:16:22 +00:00

16 lines
515 B
Plaintext

$OpenBSD: patch-src_macros_c,v 1.1 2004/06/19 22:16:23 jakob Exp $
--- src/macros.c.orig 2004-06-19 23:54:01.000000000 +0200
+++ src/macros.c 2004-06-20 00:00:25.000000000 +0200
@@ -115,7 +115,10 @@ format_tzofs(char *dest, size_t left)
(timezone < 0 ? -timezone : timezone) / 3600,
(timezone % 3600) / 60);
#else
- length = strftime(dest, left -1, "%z", tm);
+ time_t unixtime;
+ tzset();
+ time(&unixtime);
+ length = strftime(dest, left -1, "%z", localtime(&unixtime));
#endif
return length;
}