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

◆ ValidateOffset()

static short System.DateTimeOffset.ValidateOffset ( TimeSpan offset)
inlinestaticprivate

Definition at line 609 of file DateTimeOffset.cs.

610 {
611 long ticks = offset.Ticks;
612 if (ticks % 600000000 != 0L)
613 {
614 throw new ArgumentException(SR.Argument_OffsetPrecision, "offset");
615 }
616 if (ticks < -504000000000L || ticks > 504000000000L)
617 {
618 throw new ArgumentOutOfRangeException("offset", SR.Argument_OffsetOutOfRange);
619 }
620 return (short)(offset.Ticks / 600000000);
621 }

References System.SR.Argument_OffsetOutOfRange, System.SR.Argument_OffsetPrecision, System.Runtime.Serialization.Dictionary, System.L, and System.offset.

Referenced by System.DateTimeOffset.DateTimeOffset(), System.DateTimeOffset.DateTimeOffset(), System.DateTimeOffset.DateTimeOffset(), System.DateTimeOffset.DateTimeOffset(), System.DateTimeOffset.DateTimeOffset(), and System.DateTimeOffset.OnDeserialization().