msi: Pad the month and day to two digits.

This commit is contained in:
James Hawkins 2008-01-06 12:23:38 -07:00 committed by Alexandre Julliard
parent d316a94ecb
commit 837588c6a3
2 changed files with 2 additions and 2 deletions

View File

@ -3978,7 +3978,7 @@ static UINT ACTION_RegisterProduct(MSIPACKAGE *package)
{'P','r','o','d','u','c','t','V','e','r','s','i','o','n',0};
SYSTEMTIME systime;
static const WCHAR date_fmt[] = {'%','i','%','i','%','i',0};
static const WCHAR date_fmt[] = {'%','i','%','0','2','i','%','0','2','i',0};
LPWSTR upgrade_code;
WCHAR szDate[9];

View File

@ -1922,7 +1922,7 @@ static void get_date_str(LPSTR date)
{
SYSTEMTIME systime;
static const char date_fmt[] = "%d%d%d";
static const char date_fmt[] = "%d%02d%02d";
GetLocalTime(&systime);
sprintf(date, date_fmt, systime.wYear, systime.wMonth, systime.wDay);
}