Added GetDateTimeString function. (returns date in "YYYY-MM-DD HH:MM:SS" format)
This commit is contained in:
@@ -15,7 +15,9 @@ sm-ssc v1.2 | 201012xx
|
|||||||
|
|
||||||
20101219
|
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
|
20101218
|
||||||
--------
|
--------
|
||||||
|
|||||||
+1
-2
@@ -73,9 +73,7 @@ void DateTime::StripTime()
|
|||||||
tm_sec = 0;
|
tm_sec = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
|
||||||
// Common SQL/XML format: "YYYY-MM-DD HH:MM:SS"
|
// Common SQL/XML format: "YYYY-MM-DD HH:MM:SS"
|
||||||
//
|
|
||||||
RString DateTime::GetString() const
|
RString DateTime::GetString() const
|
||||||
{
|
{
|
||||||
RString s = ssprintf( "%d-%02d-%02d",
|
RString s = ssprintf( "%d-%02d-%02d",
|
||||||
@@ -314,6 +312,7 @@ LuaFunction( Second, GetLocalTime().tm_sec );
|
|||||||
LuaFunction( Year, GetLocalTime().tm_year+1900 );
|
LuaFunction( Year, GetLocalTime().tm_year+1900 );
|
||||||
LuaFunction( Weekday, GetLocalTime().tm_wday );
|
LuaFunction( Weekday, GetLocalTime().tm_wday );
|
||||||
LuaFunction( DayOfYear, GetLocalTime().tm_yday );
|
LuaFunction( DayOfYear, GetLocalTime().tm_yday );
|
||||||
|
LuaFunction( GetDateTimeString, GetString() );
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* (c) 2001-2004 Chris Danford
|
* (c) 2001-2004 Chris Danford
|
||||||
|
|||||||
Reference in New Issue
Block a user