271 static float GetLocalGMTOffset(
bool accountForDST =
false);
278 void SetToLocalTime();
297 void IncrementClock(
double seconds);
309 void AdjustTimeZone(
float newGMTOffset);
327 void GetTime(
unsigned& year,
unsigned& month,
unsigned& day,
unsigned& hour,
unsigned& min,
float& sec)
const;
341 void GetTime(
unsigned& year,
unsigned& month,
unsigned& day,
unsigned& hour,
unsigned& min,
unsigned& sec)
const;
359 void GetGMTTime(
unsigned& year,
unsigned& month,
unsigned& day,
unsigned& hour,
unsigned& min,
float& sec)
const;
373 void GetGMTTime(
unsigned& year,
unsigned& month,
unsigned& day,
unsigned& hour,
unsigned& min,
unsigned& sec)
const;
389 void SetTime(
unsigned year,
unsigned month,
unsigned day,
unsigned hour,
unsigned min,
float sec);
403 void SetTime(
unsigned year,
unsigned month,
unsigned day,
unsigned hour,
unsigned min,
unsigned sec);
414 time_t GetTime()
const;
424 time_t GetGMTTime()
const;
434 void SetTime(time_t);
444 double GetTimeInSeconds()
const;
453 void GetTime(tm&)
const;
463 void GetGMTTime(tm&)
const;
472 void SetTime(
const tm&);
485 void SetGMTOffset(
float hourOffset,
bool dayLightSavings);
504 static float CalcGMTOffset(tm& timeParts,
bool factorLocalDayLightSavingsIntoGMTOffset);
518 void SetGMTOffset(
double lattitude,
double longitude,
bool dayLightSavings);
528 float GetGMTOffset()
const;
538 float GetTimeScale()
const;
548 void SetTimeScale(
float percentScaleInSeconds);
557 const TimeType& GetTimeType()
const;
617 float GetSecond()
const;
626 void SetSecond(
float sec);
635 unsigned GetMinute()
const;
644 void SetMinute(
unsigned min);
653 unsigned GetHour()
const;
662 void SetHour(
unsigned hour);
671 unsigned GetDay()
const;
680 void SetDay(
unsigned day);
689 unsigned GetMonth()
const;
698 void SetMonth(
unsigned month);
707 unsigned GetYear()
const;
716 void SetYear(
unsigned year);
760 operator time_t()
const;
778 operator std::string()
const;
796 void ResetToDefaultValues();
806 static void GetGMTTime(time_t* t, tm& timeParts);
816 static void GetLocalTime(time_t* t, tm& timeParts);
833 unsigned mSeconds, mMinutes, mHours, mDays, mMonths,
mYears;
static const TimeFormat CALENDAR_DATE_AND_TIME_FORMAT
CALENDAR_DATE_AND_TIME_FORMAT: 2008-04-18T13:22:50-05:00.
static const TimeType TRIP_TIME
The trip time.
TimeOrigin(const std::string &name)
Constructor.
float mTimeScale
The time scale.
const TimeFormat * mStringFormat
The string format.
TimeType(const std::string &name)
Constructor.
static const TimeType TIME_STAMP
The time stamp.
std::string ToString(const T &t, int precision=-1)
A utility function to convert a basic type into a string.
static const TimeFormat LOCAL_DATE_AND_TIME_FORMAT
LOCAL_DATE_AND_TIME_FORMAT: 04-18-08 13:22:50.
const TimeType * mTimeType
Type of the time.
static const TimeFormat LOCAL_DATE_FORMAT
LOCAL_DATE_FORMAT: 04/18/08.
static const TimeType CLOCK_TIME
The clock time.
#define DECLARE_ENUM(EnumType)
Helper macros used to create the static data and methods needed to enumerate an EnumerationString.
static const TimeFormat CLOCK_TIME_12_HOUR_FORMAT
CLOCK_TIME_12_HOUR_FORMAT: 01:22:50 PM.
This class represents a type-safe EnumerationString pattern.
A class that represents date time utility.
float mGMTOffset
The GMT offset.
static const TimeOrigin LOCAL_TIME
The local time.
static const TimeFormat CALENDAR_DATE_FORMAT
CALENDAR_DATE_FORMAT: 2008-04-18.
Namespace that holds various utility classes for the engine.
static const TimeFormat WEEK_DATE_FORMAT
WEEK_DATE_FORMAT: 2008-W15-5.
static const TimeOrigin GMT_TIME
The GMT time.
static const TimeFormat CLOCK_TIME_24_HOUR_FORMAT
CLOCK_TIME_24_HOUR_FORMAT: 13:22:50.
unsigned mYears
Store parts of time.
static const TimeType TIME_TYPE_OTHER
The time type other.
static const TimeFormat LEXICAL_DATE_FORMAT
LEXICAL_DATE_FORMAT: April 18, 2008.
const TimeOrigin * mTimeOrigin
The time origin.
TimeFormat(const std::string &name)
Constructor.
double mFractionalSeconds
The fractional in seconds.
static const TimeType SIMULATION_TIME
The simulation time.
static const TimeType SCENARIO_TIME
The scenario time.
static const TimeFormat ORDINAL_DATE_FORMAT
ORDINAL_DATE_FORMAT: 2008-109.