Convert LocalDateTime to/from TM

The MAXON API provides the developer with two practical global functions to convert maxon::LocalDateTime to ANSI tm struct and vice versa.

Provided functions are:

From LocalDateTime to ANSI tm:

// This example converts a LocalDateTime to a tm.
const Int32 year = 2016;
const Int32 month = 7;
const Int32 day = 1;
const Int32 hour = 9;
const Int32 minute = 0;
const Int32 second = 0;
const maxon::LocalDateTime ldt = maxon::LocalDateTime::FromValues(year, month, day, hour, minute, second) iferr_return;
const tm tmvalue = ConvertLocalDateTimeToTM(ldt);

From ANSI tm to maxon::LocalDateTime:

// This example converts a tm object to a LocalDateTime object.
tm tmvalue;
tmvalue.tm_year = 2016;
tmvalue.tm_mon = 7;
tmvalue.tm_mday = 1;
tmvalue.tm_hour = 9;
tmvalue.tm_min = 0;
tmvalue.tm_sec = 0;
iferr_return
#define iferr_return
Definition: resultbase.h:1434
maxon::ConvertTMToLocalDateTime
MAXON_ATTRIBUTE_FORCE_INLINE LocalDateTime ConvertTMToLocalDateTime(const tm &st)
Definition: ansi_type_conversions.h:39
maxon::LocalDateTime::FromValues
static Result< LocalDateTime > FromValues(Int32 year, UChar month, UChar day, UChar hour, UChar minute, UChar second, DST daylightSavingTime=DST::AUTOMATIC)
maxon::LocalDateTime
Definition: datetime.h:91
Int32
maxon::Int32 Int32
Definition: ge_sys_math.h:45
maxon::ConvertLocalDateTimeToTM
MAXON_ATTRIBUTE_FORCE_INLINE tm ConvertLocalDateTimeToTM(const LocalDateTime &dateTime)
Definition: ansi_type_conversions.h:17