summaryrefslogtreecommitdiff
path: root/ftparchive/writer.cc
diff options
context:
space:
mode:
authorDavid Kalnischkies <kalnischkies@gmail.com>2011-02-22 13:24:40 +0100
committerDavid Kalnischkies <kalnischkies@gmail.com>2011-02-22 13:24:40 +0100
commitcb12d0a677b63b6faeaefeda475c466d66fed212 (patch)
tree5fab867107db82eeb6539ff34729154aa4e8f74f /ftparchive/writer.cc
parentef84d828654860954cdf2b63aa16f7680adcf352 (diff)
downloadapt-cb12d0a677b63b6faeaefeda475c466d66fed212.tar.gz
* ftparchive/writer.cc:
- ensure that Date and Valid-Until time strings are not localised
Diffstat (limited to 'ftparchive/writer.cc')
-rw-r--r--ftparchive/writer.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/ftparchive/writer.cc b/ftparchive/writer.cc
index 9cdca8d3e..80ec61ab9 100644
--- a/ftparchive/writer.cc
+++ b/ftparchive/writer.cc
@@ -925,6 +925,9 @@ ReleaseWriter::ReleaseWriter(string const &DB)
Output = stdout;
time_t const now = time(NULL);
+
+ setlocale(LC_TIME, "C");
+
char datestr[128];
if (strftime(datestr, sizeof(datestr), "%a, %d %b %Y %H:%M:%S UTC",
gmtime(&now)) == 0)
@@ -941,6 +944,8 @@ ReleaseWriter::ReleaseWriter(string const &DB)
validstr[0] = '\0';
}
+ setlocale(LC_TIME, "");
+
map<string,string> Fields;
Fields["Origin"] = "";
Fields["Label"] = "";