From 6fc4979a1f8f310fa87bdf6ea8ba4d4af070ff56 Mon Sep 17 00:00:00 2001 From: Miguel Freitas Date: Sun, 20 Oct 2013 18:23:57 -0200 Subject: [PATCH] no setlocale in android --- src/bitcoinrpc.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/bitcoinrpc.cpp b/src/bitcoinrpc.cpp index 14660750..0951e81e 100644 --- a/src/bitcoinrpc.cpp +++ b/src/bitcoinrpc.cpp @@ -308,10 +308,14 @@ string rfc1123Time() time_t now; time(&now); struct tm* now_gmt = gmtime(&now); +#ifndef __ANDROID__ string locale(setlocale(LC_TIME, NULL)); setlocale(LC_TIME, "C"); // we want POSIX (aka "C") weekday/month strings +#endif strftime(buffer, sizeof(buffer), "%a, %d %b %Y %H:%M:%S +0000", now_gmt); +#ifndef __ANDROID__ setlocale(LC_TIME, locale.c_str()); +#endif return string(buffer); }