This commit is contained in:
luoliangyi 2023-09-04 15:20:41 +08:00
parent 795db67ffb
commit a9bda29324
1 changed files with 4 additions and 1 deletions

View File

@ -3118,10 +3118,13 @@ static int getDays(int year, int month)
static int getPatchVersion()
{
QDate date = QLocale(QLocale::English).toDate(__DATE__, "MMM dd yyyy");
const char *buildDate = __DATE__;
HGBase_WriteInfo(HGBASE_INFOTYPE_ERROR, "buildDate: %s", buildDate);
QDate date = QLocale(QLocale::English).toDate(QString(buildDate).replace(" ", " 0"), "MMM dd yyyy");
int year = date.year();
int day = date.day();
int month = date.month();
HGBase_WriteInfo(HGBASE_INFOTYPE_ERROR, "buildDate: %d %d %d", year, month, day);
int ret = year % 100;
ret *= 1000;