diff --git a/ml_date.cpp b/ml_date.cpp index ee0304f..2350e4e 100644 --- a/ml_date.cpp +++ b/ml_date.cpp @@ -33,7 +33,7 @@ std::string date_to_string(const long datetime, const std::string& format) { } time_t time_to_epoch ( const struct tm *ltm, int utcdiff ) { - const int mon_days [] = {0, 31, 31+28, 31+28+31, + constexpr int mon_days [] = {0, 31, 31+28, 31+28+31, 31+28+31+30, 31+28+31+30+31, 31+28+31+30+31+30, 31+28+31+30+31+30+31, 31+28+31+30+31+30+31+31, 31+28+31+30+31+30+31+31+30, 31+28+31+30+31+30+31+31+30+31, 31+28+31+30+31+30+31+31+30+31+30, 31+28+31+30+31+30+31+31+30+31+30+31};