diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2001-03-14 23:37:17 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2001-03-14 23:37:17 +0000 |
commit | 0f79b186d9f742ed263ed8e9223f752779b271c0 (patch) | |
tree | 347f64bdd3892a777344f9d63c64ad6aace2d663 | |
parent | 2bdce789186e00a610b5fc874e800da21af9c842 (diff) | |
download | fetchmail-0f79b186d9f742ed263ed8e9223f752779b271c0.tar.gz fetchmail-0f79b186d9f742ed263ed8e9223f752779b271c0.tar.bz2 fetchmail-0f79b186d9f742ed263ed8e9223f752779b271c0.zip |
Corrected patch.
svn path=/trunk/; revision=3258
-rw-r--r-- | env.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -27,6 +27,10 @@ #include "fetchmail.h" #include "i18n.h" +#if defined(HAVE_SETLOCALE) && defined(ENABLE_NLS) && defined(HAVE_STRFTIME) +#include <time.h> +#include <locale.h> +#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 /* |