GetLocalTime()
This commit is contained in:
@@ -130,20 +130,12 @@ CString SecondsToTime( float fSecs )
|
|||||||
return sReturn;
|
return sReturn;
|
||||||
}
|
}
|
||||||
|
|
||||||
int MonthOfYear()
|
struct tm GetLocalTime()
|
||||||
{
|
{
|
||||||
const time_t t = time(NULL);
|
const time_t t = time(NULL);
|
||||||
struct tm tm;
|
struct tm tm;
|
||||||
localtime_r( &t, &tm );
|
localtime_r( &t, &tm );
|
||||||
return tm.tm_mon;
|
return tm;
|
||||||
}
|
|
||||||
|
|
||||||
int DayOfMonth()
|
|
||||||
{
|
|
||||||
const time_t t = time(NULL);
|
|
||||||
struct tm tm;
|
|
||||||
localtime_r( &t, &tm );
|
|
||||||
return tm.tm_mday;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -140,8 +140,7 @@ bool IsHexVal( const CString &s );
|
|||||||
float TimeToSeconds( const CString &sHMS );
|
float TimeToSeconds( const CString &sHMS );
|
||||||
CString SecondsToTime( float fSecs );
|
CString SecondsToTime( float fSecs );
|
||||||
|
|
||||||
int MonthOfYear();
|
struct tm GetLocalTime();
|
||||||
int DayOfMonth();
|
|
||||||
|
|
||||||
CString ssprintf( const char *fmt, ...) PRINTF(1,2);
|
CString ssprintf( const char *fmt, ...) PRINTF(1,2);
|
||||||
CString vssprintf( const char *fmt, va_list argList );
|
CString vssprintf( const char *fmt, va_list argList );
|
||||||
|
|||||||
Reference in New Issue
Block a user