|
|
@ -308,10 +308,14 @@ string rfc1123Time() |
|
|
|
time_t now; |
|
|
|
time_t now; |
|
|
|
time(&now); |
|
|
|
time(&now); |
|
|
|
struct tm* now_gmt = gmtime(&now); |
|
|
|
struct tm* now_gmt = gmtime(&now); |
|
|
|
|
|
|
|
#ifndef __ANDROID__ |
|
|
|
string locale(setlocale(LC_TIME, NULL)); |
|
|
|
string locale(setlocale(LC_TIME, NULL)); |
|
|
|
setlocale(LC_TIME, "C"); // we want POSIX (aka "C") weekday/month strings
|
|
|
|
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); |
|
|
|
strftime(buffer, sizeof(buffer), "%a, %d %b %Y %H:%M:%S +0000", now_gmt); |
|
|
|
|
|
|
|
#ifndef __ANDROID__ |
|
|
|
setlocale(LC_TIME, locale.c_str()); |
|
|
|
setlocale(LC_TIME, locale.c_str()); |
|
|
|
|
|
|
|
#endif |
|
|
|
return string(buffer); |
|
|
|
return string(buffer); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|