kdenetwork/kpf/src Server.cpp,1.12,1.13 Utils.cpp,1.7,1.8 Author: rikkus Wed May 1 00:55:41 CEST 2002 In directory office:/tmp/cvs-serv20377 Modified Files: Server.cpp Utils.cpp Log Message: Patch from Harald H.-J. Bongartz which fixes Content-Range (resume support). Thanks Harald! My own version of setlocale() stuff to ensure we reset LC_ALL. I this this is ok... --- Utils.cpp 2002/01/26 21:33:37 1.7 +++ Utils.cpp 2002/04/30 22:54:32 @@ -22,6 +22,7 @@ */ #include +#include #include #include @@ -126,7 +127,15 @@ namespace KPF char buf[len]; - ::strftime(static_cast(buf), len, rfc1123Format, asTm); + // Ensure we use locale "C" for strftime. + + QCString oldLC_ALL = ::strdup(::setlocale(LC_TIME, "C")); + QCString oldLC_TIME = ::strdup(::setlocale(LC_ALL, "C")); + { + ::strftime(static_cast(buf), len, rfc1123Format, asTm); + } + ::setlocale(LC_TIME, oldLC_TIME.data()); + ::setlocale(LC_ALL, oldLC_ALL.data()); return QString::fromUtf8(buf); };