From 103fbbc1e24135601abde2bab890e14b5e48d13c Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Sat, 14 Feb 2004 11:19:18 +0000 Subject: [PATCH] GetLocalTime() --- stepmania/src/RageUtil.cpp | 12 ++---------- stepmania/src/RageUtil.h | 3 +-- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/stepmania/src/RageUtil.cpp b/stepmania/src/RageUtil.cpp index f28f20314a..6e0ed699e7 100644 --- a/stepmania/src/RageUtil.cpp +++ b/stepmania/src/RageUtil.cpp @@ -130,20 +130,12 @@ CString SecondsToTime( float fSecs ) return sReturn; } -int MonthOfYear() +struct tm GetLocalTime() { const time_t t = time(NULL); struct tm tm; localtime_r( &t, &tm ); - return tm.tm_mon; -} - -int DayOfMonth() -{ - const time_t t = time(NULL); - struct tm tm; - localtime_r( &t, &tm ); - return tm.tm_mday; + return tm; } diff --git a/stepmania/src/RageUtil.h b/stepmania/src/RageUtil.h index ee77267a1a..6a3c31714a 100644 --- a/stepmania/src/RageUtil.h +++ b/stepmania/src/RageUtil.h @@ -140,8 +140,7 @@ bool IsHexVal( const CString &s ); float TimeToSeconds( const CString &sHMS ); CString SecondsToTime( float fSecs ); -int MonthOfYear(); -int DayOfMonth(); +struct tm GetLocalTime(); CString ssprintf( const char *fmt, ...) PRINTF(1,2); CString vssprintf( const char *fmt, va_list argList );