Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ DateTimeOffset() [7/8]

System.DateTimeOffset.DateTimeOffset ( int year,
int month,
int day,
int hour,
int minute,
int second,
int millisecond,
Calendar calendar,
TimeSpan offset )
inline

Definition at line 146 of file DateTimeOffset.cs.

147 {
149 int num = second;
150 if (second == 60 && DateTime.s_systemSupportsLeapSeconds)
151 {
152 second = 59;
153 }
154 _dateTime = ValidateDate(new DateTime(year, month, day, hour, minute, second, millisecond, calendar), offset);
156 {
157 throw new ArgumentOutOfRangeException(null, SR.ArgumentOutOfRange_BadHourMinuteSecond);
158 }
159 }
static DateTime ValidateDate(DateTime dateTime, TimeSpan offset)
static short ValidateOffset(TimeSpan offset)
readonly short _offsetMinutes
readonly DateTime _dateTime
static unsafe bool IsValidTimeWithLeapSeconds(int year, int month, int day, int hour, int minute, DateTimeKind kind)
Definition DateTime.cs:1487
static readonly bool s_systemSupportsLeapSeconds
Definition DateTime.cs:43

References System.DateTimeOffset._dateTime, System.DateTimeOffset._offsetMinutes, System.SR.ArgumentOutOfRange_BadHourMinuteSecond, System.DateTimeOffset.DateTime, System.DateTime.Day, System.Runtime.Serialization.Dictionary, System.DateTime.Hour, System.DateTime.IsValidTimeWithLeapSeconds(), System.DateTime.Minute, System.DateTime.Month, System.offset, System.DateTime.s_systemSupportsLeapSeconds, System.DateTimeOffset.ValidateDate(), System.DateTimeOffset.ValidateOffset(), System.DateTime.Year, and System.year.