X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/cfc6566d5097ef5518e12f5c1e5f15a8f5b182cf..3465138575e1fd0d5892d9b6be1ae232eb873460:/ftparchive/writer.cc?ds=sidebyside diff --git a/ftparchive/writer.cc b/ftparchive/writer.cc index dbeaa16a6..c34a04d1a 100644 --- a/ftparchive/writer.cc +++ b/ftparchive/writer.cc @@ -969,11 +969,15 @@ bool ContentsWriter::ReadFromPkgs(string const &PkgFile,string const &PkgCompres /* */ static std::string formatUTCDateTime(time_t const now) { + bool const NumericTimezone = _config->FindB("APT::FTPArchive::Release::NumericTimezone", true); // TimeRFC1123 uses GMT to satisfy HTTP/1.1 - std::string datetime = TimeRFC1123(now); - auto const lastspace = datetime.rfind(' '); - if (likely(lastspace != std::string::npos)) - datetime.replace(lastspace + 1, 3, "UTC"); + std::string datetime = TimeRFC1123(now, NumericTimezone); + if (NumericTimezone == false) + { + auto const lastspace = datetime.rfind(' '); + if (likely(lastspace != std::string::npos)) + datetime.replace(lastspace + 1, 3, "UTC"); + } return datetime; } ReleaseWriter::ReleaseWriter(FileFd * const GivenOutput, string const &/*DB*/) : FTWScanner(GivenOutput)