diff options
-rw-r--r-- | plugins/Svc_vi/CVersionInfo.cpp | 2 | ||||
-rw-r--r-- | plugins/Svc_vi/utils.cpp | 15 |
2 files changed, 7 insertions, 10 deletions
diff --git a/plugins/Svc_vi/CVersionInfo.cpp b/plugins/Svc_vi/CVersionInfo.cpp index f8b89d81de..b3b2825922 100644 --- a/plugins/Svc_vi/CVersionInfo.cpp +++ b/plugins/Svc_vi/CVersionInfo.cpp @@ -165,7 +165,7 @@ bool CVersionInfo::GetMirandaVersion() TCHAR time[128], date[128];
GetModuleTimeStamp(date, time);
- lpzBuildTime = std::tstring(time) + _T(" on ") + std::tstring(date);
+ lpzBuildTime = std::tstring(time) + _T(" (UTC) on ") + std::tstring(date);
return TRUE;
}
diff --git a/plugins/Svc_vi/utils.cpp b/plugins/Svc_vi/utils.cpp index 47fff93119..1111bc96f9 100644 --- a/plugins/Svc_vi/utils.cpp +++ b/plugins/Svc_vi/utils.cpp @@ -202,25 +202,22 @@ void TimeStampToSysTime(DWORD Unix,SYSTEMTIME* SysTime) FileTimeToSystemTime((FILETIME*)&FileReal,SysTime);
}
-void GetModuleTimeStamp(TCHAR* pszDate, TCHAR* pszTime)
+void GetModuleTimeStamp(TCHAR* ptszDate, TCHAR* ptszTime)
{
- TCHAR date[128],time[128],szModule[MAX_PATH];
+ TCHAR tszModule[MAX_PATH];
HANDLE mapfile,file;
DWORD timestamp,filesize;
LPVOID mapmem;
SYSTEMTIME systime;
- GetModuleFileName(NULL,szModule,MAX_PATH);
- file = CreateFile(szModule,GENERIC_READ,FILE_SHARE_READ,NULL,OPEN_EXISTING,FILE_ATTRIBUTE_NORMAL,NULL);
+ GetModuleFileName(NULL,tszModule,SIZEOF(tszModule));
+ file = CreateFile(tszModule,GENERIC_READ,FILE_SHARE_READ,NULL,OPEN_EXISTING,FILE_ATTRIBUTE_NORMAL,NULL);
filesize = GetFileSize(file,NULL);
mapfile = CreateFileMapping(file, NULL, PAGE_READONLY, 0, filesize, NULL);
mapmem = MapViewOfFile(mapfile, FILE_MAP_READ, 0, 0, 0);
timestamp = GetTimestampForLoadedLibrary((HINSTANCE)mapmem);
TimeStampToSysTime(timestamp,&systime);
- GetTimeFormat(LOCALE_USER_DEFAULT, 0, &systime, _T("HH':'mm':'ss"), time, 128);
- GetDateFormat(EnglishLocale, 0, &systime, _T("dd' 'MMMM' 'yyyy"), date, 128);
- //MessageBox(NULL,date,time,0);
- lstrcpy(pszTime, time);
- lstrcpy(pszDate, date);
+ GetTimeFormat(LOCALE_USER_DEFAULT, 0, &systime, _T("HH':'mm':'ss"), ptszTime, 40 );
+ GetDateFormat(EnglishLocale, 0, &systime, _T("dd' 'MMMM' 'yyyy"), ptszDate, 40);
UnmapViewOfFile(mapmem);
CloseHandle(mapfile);
CloseHandle(file);
|