summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-05-28 17:16:00 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-05-28 17:16:00 +0000
commit124ac1146c6b240fa00495b0023597877395090e (patch)
tree1fe2e45e3eb694e512bbabfa3380dc4b266983da /plugins
parent9695e5c27713ed60055ba0e0569a9716d8f97ec5 (diff)
added mark 'UTC' to the module creation time
git-svn-id: http://svn.miranda-ng.org/main/trunk@220 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins')
-rw-r--r--plugins/Svc_vi/CVersionInfo.cpp2
-rw-r--r--plugins/Svc_vi/utils.cpp15
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);