You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
1.2 KiB
37 lines
1.2 KiB
//----------------------------------------------------------------------------
|
|
// Laser Guard Ltd.
|
|
// Copyright © 2000-2002. All Rights Reserved.
|
|
// Version 1.0 01/01/2000
|
|
// Last modification: 08/10/2003
|
|
// PROJECT:
|
|
// SUBSYSTEM:
|
|
// FILE: Version.cpp
|
|
// AUTHOR: Sergey Chizhevskiy
|
|
// OVERVIEW
|
|
// ~~~~~~~~
|
|
// Source file of Version.cpp
|
|
//----------------------------------------------------------------------------
|
|
#include "stdafx.h"
|
|
#include "..\LgLib\Version.h"
|
|
|
|
struct tm CLgVersion::m_Time = {0,0,0,1,0,0,0,0};
|
|
TCHAR CLgVersion::m_pTime[MAX_PATH] = "";
|
|
|
|
CLgVersion::CLgVersion( LPCTSTR pTime, LPCTSTR pDate )
|
|
{
|
|
LPCTSTR pMonth = "JanFebMarAprMayJunJulAugSepOctNovDec";
|
|
|
|
struct tm tNew;
|
|
memset( &tNew, 0, sizeof(tNew) );
|
|
TCHAR pM[MAX_PATH];
|
|
sscanf( pDate, _T("%3s %hu %hu"), pM, &tNew.tm_mday, &tNew.tm_year );
|
|
tNew.tm_mon = (INT)(strstr( pMonth, pM ) - pMonth) / 3;
|
|
sscanf( pTime, _T("%hu:%hu:%hu"), &tNew.tm_hour, &tNew.tm_min, &tNew.tm_sec );
|
|
tNew.tm_year -= 1900;
|
|
tNew.tm_wday = tNew.tm_yday = tNew.tm_isdst = -1;
|
|
if( mktime( &tNew ) > mktime( &m_Time ) )
|
|
{
|
|
m_Time = tNew;
|
|
strftime( m_pTime, MAX_PATH, _T("%d/%m/%Y %H:%M:%S"), &tNew );
|
|
}
|
|
}
|