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

◆ DoubleDateToTicks()

static long System.DateTime.DoubleDateToTicks ( double value)
inlinestaticpackage

Definition at line 633 of file DateTime.cs.

634 {
635 if (!(value < 2958466.0) || !(value > -657435.0))
636 {
637 throw new ArgumentException(SR.Arg_OleAutDateInvalid);
638 }
639 long num = (long)(value * 86400000.0 + ((value >= 0.0) ? 0.5 : (-0.5)));
640 if (num < 0)
641 {
642 num -= num % 86400000 * 2;
643 }
644 num += 59926435200000L;
645 if (num < 0 || num >= 315537897600000L)
646 {
647 throw new ArgumentException(SR.Arg_OleAutDateScale);
648 }
649 return num * 10000;
650 }

References System.SR.Arg_OleAutDateInvalid, System.SR.Arg_OleAutDateScale, System.Runtime.Serialization.Dictionary, System.L, and System.value.

Referenced by System.StubHelpers.DateMarshaler.ConvertToManaged(), and System.DateTime.FromOADate().