diff options
author | Beman Dawes <bdawes@acm.org> | 2000-12-27 02:10:20 +0000 |
---|---|---|
committer | Beman Dawes <bdawes@acm.org> | 2000-12-27 02:10:20 +0000 |
commit | 951fb8b6834baa6b1f274ba2f5de496026c99da9 (patch) | |
tree | 044dd3ce9288829351081e1c067e9f853c0459d9 | |
parent | 1b0bec7d244bc190ae047cdd9b0aabf4d0c9e22c (diff) | |
download | boost-951fb8b6834baa6b1f274ba2f5de496026c99da9.tar.gz |
Add run date/ to HTML output
[SVN r8497]
-rw-r--r-- | libs/regression.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/libs/regression.cpp b/libs/regression.cpp index 3c8861f0bc..1c3d5894ae 100644 --- a/libs/regression.cpp +++ b/libs/regression.cpp @@ -20,11 +20,12 @@ #include <cstdlib> #include <fstream> #include <utility> +#include <ctime> // It is OK to use boost headers which contain entirely inline code. #include <boost/config.hpp> # ifdef BOOST_NO_STDC_NAMESPACE - namespace std { using ::exit; using ::system; } + namespace std { using ::exit; using ::system; using ::strftime; using ::gmtime; using ::time; } # endif std::string get_host() @@ -255,11 +256,17 @@ int main(int argc, char * argv[]) std::ofstream out( ("cs-" + host + ".html").c_str() ); + char run_date[100]; + time_t ct; + std::time(&ct); + std::strftime(run_date, sizeof(run_date), "%d %b %Y %H:%M GMT", std::gmtime(&ct)); + out << "<html>\n<head>\n<title>\nCompiler Status: " + host + "\n</title>\n</head>\n" << "<body bgcolor=\"#ffffff\" text=\"#000000\">\n" << "<h1><img border border=\"0\" src=\"../c++boost.gif\" width=\"277\" height=\"86\"></h1>\n" << "<h1>Compiler Status: " + host + "</h1>\n" << "</p>\n" + << "<p><b>Run Date:</b> " << run_date << "</p>\n" << "<p>\n" << "<table border=\"1\" cellspacing=\"0\" cellpadding=\"5\">\n"; |