diff --git a/oneflow/core/job/oneflow.cpp b/oneflow/core/job/oneflow.cpp index f108aa53bf350e50bc4f80267169d4687e6b7773..6da27ec72d4d6617d079e0c6fc388e93f710aaa1 100644 --- a/oneflow/core/job/oneflow.cpp +++ b/oneflow/core/job/oneflow.cpp @@ -27,8 +27,10 @@ std::string BuildVersionString() { {"Jul", "07"}, {"Aug", "08"}, {"Sep", "09"}, {"Oct", "10"}, {"Nov", "11"}, {"Dec", "12"}, }; static const std::string date_str(__DATE__); - return OF_VERSION " (" + date_str.substr(7) + month_word2num.at(date_str.substr(0, 3)) - + date_str.substr(4, 2) + "." + __TIME__ + ")"; + std::string day = date_str.substr(4, 2); + StringReplace(&day, ' ', '0'); + return OF_VERSION " (" + date_str.substr(7) + month_word2num.at(date_str.substr(0, 3)) + day + "." + + __TIME__ + ")"; } std::string GetAmdCtrlKey(int64_t machine_id) {