mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 11:43:49 +00:00
Updates asset importer and project importer to output to separate log files into tools/logs
Add utility console function for getting current datetime
This commit is contained in:
parent
ac3126765f
commit
fda722e355
7 changed files with 195 additions and 100 deletions
|
|
@ -2841,3 +2841,21 @@ DefineEngineFunction( getStringHash, S32, (const char* _inString, bool _sensitiv
|
|||
else
|
||||
return S32(String(_inString).getHashCaseInsensitive());
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
DefineEngineFunction(getTimestamp, const char*, (), ,
|
||||
"Gets datetime string.\n\n"
|
||||
"@return YYYY-mm-DD_hh-MM-ss formatted date time string.")
|
||||
{
|
||||
Torque::Time::DateTime curTime;
|
||||
Torque::Time::getCurrentDateTime(curTime);
|
||||
|
||||
String timestampStr = String::ToString(curTime.year + 1900) + "-" +
|
||||
String::ToString(curTime.month + 1) + "-" + String::ToString(curTime.day) + "_" +
|
||||
String::ToString(curTime.hour) + "-" + String::ToString(curTime.minute) + "-" + String::ToString(curTime.second);
|
||||
|
||||
const char* returnBuffer = Con::getReturnBuffer(timestampStr);
|
||||
|
||||
return returnBuffer;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue