Added GetDateTimeString function. (returns date in "YYYY-MM-DD HH:MM:SS" format)

This commit is contained in:
AJ Kelly
2010-12-19 14:01:34 -06:00
parent 0776688a11
commit bb5246eb14
2 changed files with 4 additions and 3 deletions
+3 -1
View File
@@ -15,7 +15,9 @@ sm-ssc v1.2 | 201012xx
20101219
--------
* [WheelNotifyIcon] add BlinkPlayersBest metric [freem]
* [WheelNotifyIcon] add BlinkPlayersBest metric. [freem]
* Added GetDateTimeString function. [freem]
(returns date in "YYYY-MM-DD HH:MM:SS" format)
20101218
--------
+1 -2
View File
@@ -73,9 +73,7 @@ void DateTime::StripTime()
tm_sec = 0;
}
//
// Common SQL/XML format: "YYYY-MM-DD HH:MM:SS"
//
RString DateTime::GetString() const
{
RString s = ssprintf( "%d-%02d-%02d",
@@ -314,6 +312,7 @@ LuaFunction( Second, GetLocalTime().tm_sec );
LuaFunction( Year, GetLocalTime().tm_year+1900 );
LuaFunction( Weekday, GetLocalTime().tm_wday );
LuaFunction( DayOfYear, GetLocalTime().tm_yday );
LuaFunction( GetDateTimeString, GetString() );
/*
* (c) 2001-2004 Chris Danford