Fix broken if. Works only for OCPL and OCDE

master
Tomasz Golinski 2021-05-05 23:55:01 +02:00
rodzic 5f6f8c7acc
commit a76df5e753
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -824,7 +824,7 @@ int main(int argc, char** argv) {
std::time_t now = std::time(nullptr);
std::tm* now_tm = std::localtime(&now);
if (now_tm) {
if (!ocpl_user_uuid.empty() && !ocde_user_uuid.empty()) {
if (!ocpl_user_uuid.empty() && ocde_user_uuid.empty()) {
int m_count = (now_tm->tm_year - 106) * 12 + 8 + now_tm->tm_mon + 1; // 106 corresponds to 2006, 8 is no. of months since may till dec, +1 since tm_mon starts at 0
std::cout << "<div class=\"basic_stats\">\n";
std::cout << "Total <span class=\"value\">" << n << "</span> months out of " << m_count << " (" << std::setprecision(3) << n * 1.0 / m_count << "%).\n";