Searched refs:ToDateTime (Results 1 – 2 of 2) sorted by relevance
/external/protobuf/csharp/src/Google.Protobuf.Test/WellKnownTypes/ |
D | TimestampTest.cs | 58 ….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/ |
D | TimestampPartial.cs | 114 public DateTime ToDateTime() in ToDateTime() method in Google.Protobuf.WellKnownTypes.Timestamp 137 return new DateTimeOffset(ToDateTime(), TimeSpan.Zero); in ToDateTimeOffset()
|