Dynamically print current copyright year in `--version` output

(cherry picked from commit c1fedab7ae)
This commit is contained in:
Michael Friedrich 2019-01-07 15:59:24 +01:00
parent 14ef7cbc1f
commit 47c969eadc
1 changed files with 2 additions and 1 deletions

View File

@ -543,7 +543,8 @@ static int Main()
}
if (vm.count("version")) {
std::cout << "Copyright (c) 2012-2018 Icinga Development Team (https://icinga.com/)" << std::endl
std::cout << "Copyright (c) 2012-" << Utility::FormatDateTime("%Y", Utility::GetTime())
<< " Icinga GmbH (https://icinga.com/)" << std::endl
<< "License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl2.html>" << std::endl
<< "This is free software: you are free to change and redistribute it." << std::endl
<< "There is NO WARRANTY, to the extent permitted by law.";