Home
last modified time | relevance | path

Searched refs:ToDateTime (Results 1 – 6 of 6) sorted by relevance

/external/grpc-grpc/src/csharp/Grpc.Core.Tests/Internal/
DTimespecTest.cs32 Assert.AreEqual(DateTimeKind.Utc, Timespec.Now.ToDateTime().Kind); in Now_IsInUtc()
41 TimeSpan difference = utcNow - timespec.ToDateTime(); in Now_AgreesWithUtcNow()
70 public void ToDateTime() in ToDateTime() method in Grpc.Core.Internal.Tests.TimespecTest
73 new Timespec(0, 0).ToDateTime()); in ToDateTime()
76 new Timespec(10, 5000).ToDateTime()); in ToDateTime()
79 new Timespec(1437452508, 0).ToDateTime()); in ToDateTime()
83 new Timespec(-5, 1000).ToDateTime()); in ToDateTime()
86 Assert.AreEqual(DateTime.MaxValue, Timespec.InfFuture.ToDateTime()); in ToDateTime()
87 Assert.AreEqual(DateTime.MinValue, Timespec.InfPast.ToDateTime()); in ToDateTime()
91 new Timespec(0, 99).ToDateTime()); in ToDateTime()
[all …]
/external/protobuf/csharp/compatibility_tests/v3.0.0/src/Google.Protobuf.Test/WellKnownTypes/
DTimestampTest.cs58 ….AreEqual(new DateTime(1970, 1, 1, 0, 0, 1, DateTimeKind.Utc).AddMilliseconds(1), t1.ToDateTime()); in ToDateTimeTruncation()
61 … Assert.AreEqual(new DateTime(1969, 12, 31, 23, 59, 59).AddMilliseconds(1), t2.ToDateTime()); in ToDateTimeTruncation()
72 Assert.Throws<InvalidOperationException>(() => value.ToDateTime()); in ToDateTime_OutOfRange()
84 value.ToDateTime(); in ToDateTime_ValidBoundaries()
90 Assert.AreEqual(dateTime, timestamp.ToDateTime()); in AssertRoundtrip()
91 Assert.AreEqual(DateTimeKind.Utc, timestamp.ToDateTime().Kind); in AssertRoundtrip()
/external/protobuf/csharp/src/Google.Protobuf.Test/WellKnownTypes/
DTimestampTest.cs58 ….AreEqual(new DateTime(1970, 1, 1, 0, 0, 1, DateTimeKind.Utc).AddMilliseconds(1), t1.ToDateTime()); in ToDateTimeTruncation()
61 … Assert.AreEqual(new DateTime(1969, 12, 31, 23, 59, 59).AddMilliseconds(1), t2.ToDateTime()); in ToDateTimeTruncation()
72 Assert.Throws<InvalidOperationException>(() => value.ToDateTime()); in ToDateTime_OutOfRange()
84 value.ToDateTime(); in ToDateTime_ValidBoundaries()
90 Assert.AreEqual(dateTime, timestamp.ToDateTime()); in AssertRoundtrip()
91 Assert.AreEqual(DateTimeKind.Utc, timestamp.ToDateTime().Kind); in AssertRoundtrip()
/external/protobuf/csharp/src/Google.Protobuf/WellKnownTypes/
DTimestampPartial.cs114 public DateTime ToDateTime() in ToDateTime() method in Google.Protobuf.WellKnownTypes.Timestamp
137 return new DateTimeOffset(ToDateTime(), TimeSpan.Zero); in ToDateTimeOffset()
/external/grpc-grpc/src/csharp/Grpc.Core/Internal/
DTimespec.cs127 public DateTime ToDateTime() in ToDateTime() method
DServerCallHandler.cs352 … DateTime realtimeDeadline = newRpc.Deadline.ToClockType(ClockType.Realtime).ToDateTime();