diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/integration/framework | 10 | ||||
-rw-r--r-- | test/interactive-helper/aptwebserver.cc | 6 |
2 files changed, 8 insertions, 8 deletions
diff --git a/test/integration/framework b/test/integration/framework index 8ca878148..4aa89cf20 100644 --- a/test/integration/framework +++ b/test/integration/framework @@ -219,10 +219,10 @@ gdb() { runapt command gdb --quiet -ex run "$CMD" --args "$CMD" "$@" } lastmodification() { - date -u -d "@$(stat -c '%Y' "${TMPWORKINGDIRECTORY}/$1")" '+%a, %d %b %Y %H:%M:%S GMT' + date -u -d "@$(stat -c '%Y' "${TMPWORKINGDIRECTORY}/$1")" -R } releasefiledate() { - grep "^${2:-Date}:" "$1" | cut -d' ' -f 2- | sed -e 's#UTC#GMT#' + grep "^${2:-Date}:" "$1" | cut -d' ' -f 2- } exitwithstatus() { @@ -1016,13 +1016,13 @@ NotAutomatic: yes' "$dir/Release" fi if [ -n "$DATE" -a "$DATE" != "now" ]; then for release in $(find ./aptarchive -name 'Release'); do - sed -i "s/^Date: .*$/Date: $(date -u -d "$DATE" '+%a, %d %b %Y %H:%M:%S %Z')/" "$release" + sed -i "s/^Date: .*$/Date: $(date -u -d "$DATE" -R)/" "$release" touch -d "$DATE" "$release" done fi if [ -n "$VALIDUNTIL" ]; then sed -i "/^Date: / a\ -Valid-Until: $(date -u -d "$VALIDUNTIL" '+%a, %d %b %Y %H:%M:%S %Z')" $(find ./aptarchive -name 'Release') +Valid-Until: $(date -u -d "$VALIDUNTIL" -R)" $(find ./aptarchive -name 'Release') fi msgdone "info" } @@ -1154,7 +1154,7 @@ signreleasefiles() { } redatereleasefiles() { - local DATE="$(date -u -d "$1" '+%a, %d %b %Y %H:%M:%S %Z')" + local DATE="$(date -u -d "$1" -R)" for release in $(find aptarchive/ -name 'Release'); do sed -i "s/^Date: .*$/Date: ${DATE}/" "$release" touch -d "$DATE" "$release" diff --git a/test/interactive-helper/aptwebserver.cc b/test/interactive-helper/aptwebserver.cc index 3e91406ab..817760ec3 100644 --- a/test/interactive-helper/aptwebserver.cc +++ b/test/interactive-helper/aptwebserver.cc @@ -99,7 +99,7 @@ static void addFileHeaders(std::list<std::string> &headers, FileFd &data)/*{{{*/ if (_config->FindB("aptwebserver::support::last-modified", true) == true) { std::string lastmodified("Last-Modified: "); - lastmodified.append(TimeRFC1123(data.ModificationTime())); + lastmodified.append(TimeRFC1123(data.ModificationTime(), false)); headers.push_back(lastmodified); } } @@ -128,7 +128,7 @@ static bool sendHead(int const client, int const httpcode, std::list<std::string headers.push_back(*h); std::string date("Date: "); - date.append(TimeRFC1123(time(NULL))); + date.append(TimeRFC1123(time(NULL), false)); headers.push_back(date); if (chunkedTransferEncoding(headers) == true) @@ -359,7 +359,7 @@ static void sendDirectoryListing(int const client, std::string const &dir,/*{{{* << "<td><a href=\"" << namelist[i]->d_name << "\">" << namelist[i]->d_name << "</a></td>" << "<td>" << SizeToStr(fs.st_size) << "B</td>"; } - listing << "<td>" << TimeRFC1123(fs.st_mtime) << "</td></tr>" << std::endl; + listing << "<td>" << TimeRFC1123(fs.st_mtime, true) << "</td></tr>" << std::endl; } listing << "</table></body></html>" << std::endl; |