[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdenetwork/kpf/src
From: Rik Hemsley <rik () kde ! org>
Date: 2002-04-30 22:55:42
[Download RAW message or body]
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 <ctime>
+#include <clocale>
#include <qfile.h>
#include <qregexp.h>
@@ -126,7 +127,15 @@ namespace KPF
char buf[len];
- ::strftime(static_cast<char *>(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<char *>(buf), len, rfc1123Format, asTm);
+ }
+ ::setlocale(LC_TIME, oldLC_TIME.data());
+ ::setlocale(LC_ALL, oldLC_ALL.data());
return QString::fromUtf8(buf);
};
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic