DateTimeOffset()

DateTimeOffset::DateTimeOffset() constructor

Default constructor.

constexpr System::DateTimeOffset::DateTimeOffset()=default

DateTimeOffset::DateTimeOffset(DateTime) constructor

Constructor.

System::DateTimeOffset::DateTimeOffset(DateTime date_time)

Arguments

ParameterTypeDescription
date_timeDateTimeDate and time.

DateTimeOffset::DateTimeOffset(int64_t, TimeSpan) constructor

Constructor.

System::DateTimeOffset::DateTimeOffset(int64_t ticks, TimeSpan offset)

Arguments

ParameterTypeDescription
ticksint64_tNumber of ticks.
offsetTimeSpanTime offset from UTC.

DateTimeOffset::DateTimeOffset(DateTime, TimeSpan) constructor

Constructor.

System::DateTimeOffset::DateTimeOffset(DateTime date_time, TimeSpan offset)

Arguments

ParameterTypeDescription
date_timeDateTimeDate and time.
offsetTimeSpanTime offset from UTC.

DateTimeOffset::DateTimeOffset(int, int, int, int, int, int, TimeSpan) constructor

Constructor.

System::DateTimeOffset::DateTimeOffset(int year, int month, int day, int hour, int minute, int second, TimeSpan offset)

Arguments

ParameterTypeDescription
yearintYear (1 through 9999).
monthintMonth (1 through 12).
dayintDay (1 through the number of days in month).
hourintHour (0 through 23).
minuteintMinute (0 through 59).
secondintSecond (0 through 59).
offsetTimeSpanTime offset from UTC.

DateTimeOffset::DateTimeOffset(int, int, int, int, int, int, int, TimeSpan) constructor

Constructor.

System::DateTimeOffset::DateTimeOffset(int year, int month, int day, int hour, int minute, int second, int millisecond, TimeSpan offset)

Arguments

ParameterTypeDescription
yearintYear (1 through 9999).
monthintMonth (1 through 12).
dayintDay (1 through the number of days in month).
hourintHour (0 through 23).
minuteintMinute (0 through 59).
secondintSecond (0 through 59).
millisecondintMillisecond (0 through 999).
offsetTimeSpanTime offset from UTC.

DateTimeOffset::DateTimeOffset(int, int, int, int, int, int, int, const SharedPtr<Globalization::Calendar>&, TimeSpan) constructor

Constructor.

System::DateTimeOffset::DateTimeOffset(int year, int month, int day, int hour, int minute, int second, int millisecond, const SharedPtr<Globalization::Calendar> &calendar, TimeSpan offset)

Arguments

ParameterTypeDescription
yearintYear.
monthintMonth (1 through 12).
dayintDay (1 through the number of days in month).
hourintHour (0 through 23).
minuteintMinute (0 through 59).
secondintSecond (0 through 59).
millisecondintMillisecond (0 through 999).
calendarconst SharedPtr<Globalization::Calendar>&Calendar used to interpret year, month, and day.
offsetTimeSpanTime offset from UTC.

See Also