From 0f79b186d9f742ed263ed8e9223f752779b271c0 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Wed, 14 Mar 2001 23:37:17 +0000 Subject: Corrected patch. svn path=/trunk/; revision=3258 --- env.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/env.c b/env.c index da1bfefe..0c174009 100644 --- a/env.c +++ b/env.c @@ -27,6 +27,10 @@ #include "fetchmail.h" #include "i18n.h" +#if defined(HAVE_SETLOCALE) && defined(ENABLE_NLS) && defined(HAVE_STRFTIME) +#include +#include +#endif extern char *getenv(); /* needed on sysV68 R3V7.1. */ @@ -181,10 +185,14 @@ char *rfc822timestamp(void) * weird multibyte i18n characters (such as kanji) for showing up * in your Received headers. */ +#if defined(HAVE_SETLOCALE) && defined(ENABLE_NLS) && defined(HAVE_STRFTIME) setlocale (LC_TIME, "C"); +#endif strftime(buf, sizeof(buf)-1, "%a, %d %b %Y %H:%M:%S XXXXX (%Z)", localtime(&now)); +#if defined(HAVE_SETLOCALE) && defined(ENABLE_NLS) && defined(HAVE_STRFTIME) setlocale (LC_TIME, ""); +#endif strncpy(strstr(buf, "XXXXX"), tzoffset(&now), 5); #else /* -- cgit v1.2.3