File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change 1111#include < algorithm>
1212#include < cassert>
1313#include < chrono>
14+ #include < cstdlib>
1415#include < format>
1516#include < fstream>
1617#include < memory>
@@ -25,7 +26,15 @@ namespace
2526// Generic utilities that are useful and do not rely on context or types from our domain (issue-list processing)
2627// =============================================================================================================
2728
28- auto const timestamp{std::chrono::floor<std::chrono::seconds>(std::chrono::system_clock::now ())};
29+ auto const timestamp = [] {
30+ // Allow the timestamp to be set from a unix timestamp in the environment,
31+ // to support reproducible HTML output. For example:
32+ // LWG_REVISION_TIME=$(date +%s -d "2025-10-07 at 09:38:29 UTC") make lists
33+ if (const char * revtime = std::getenv (" LWG_REVISION_TIME" ))
34+ return std::chrono::sys_seconds (std::chrono::seconds (std::stol (revtime)));
35+ auto now = std::chrono::system_clock::now ();
36+ return std::chrono::floor<std::chrono::seconds>(now);
37+ }();
2938
3039// global data - would like to do something about that.
3140std::string const build_date{std::format (" {:%F}" , timestamp)};
You can’t perform that action at this time.
0 commit comments