mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-12 07:04:36 +00:00
* BugFix: When querying against root with Torque::FS::DumpDirectories, correctly return directories with their path.
* Adjustment: Add commenting to some of the new programming. * Adjustment: Tweak fileCreatedTime and fileModifiedTime functions to use the VFS.
This commit is contained in:
parent
b63122ea76
commit
0e93373824
7 changed files with 77 additions and 34 deletions
|
|
@ -195,4 +195,29 @@ void Time::get(S32 *pyear, S32 *pmonth, S32 *pday, S32 *phour, S32 *pminute, S32
|
|||
*pmicrosecond = time % OneSecond;
|
||||
}
|
||||
|
||||
Platform::LocalTime Time::toLocalTime()
|
||||
{
|
||||
Platform::LocalTime result;
|
||||
result.isdst = false;
|
||||
|
||||
S32 year;
|
||||
S32 month;
|
||||
S32 day;
|
||||
S32 hour;
|
||||
S32 minute;
|
||||
S32 second;
|
||||
S32 microsecond;
|
||||
|
||||
get(&year, &month, &day, &hour, &minute, &second, µsecond);
|
||||
result.year = year - 1900;
|
||||
result.month = month - 1;
|
||||
result.yearday = day;
|
||||
result.hour = hour;
|
||||
result.min = minute;
|
||||
result.sec = second;
|
||||
result.monthday = day % 32;
|
||||
result.weekday = day % 7;
|
||||
return result;
|
||||
}
|
||||
|
||||
} // Namespace
|
||||
|
|
|
|||
|
|
@ -26,7 +26,9 @@
|
|||
#ifndef _TORQUE_TYPES_H_
|
||||
#include "platform/types.h"
|
||||
#endif
|
||||
|
||||
#ifndef _PLATFORM_H_
|
||||
#include "platform/platform.h"
|
||||
#endif
|
||||
|
||||
#if defined(TORQUE_COMPILER_VISUALC)
|
||||
#define TORQUE_CONSTANT_S64(a) (a##I64)
|
||||
|
|
@ -105,6 +107,8 @@ public:
|
|||
S64 getMicroseconds() const;
|
||||
S64 getInternalRepresentation() const;
|
||||
|
||||
Platform::LocalTime toLocalTime();
|
||||
|
||||
private:
|
||||
class Tester
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue