diff options
author | Jon Skeet <skeet@pobox.com> | 2015-11-03 22:39:08 -0800 |
---|---|---|
committer | Jon Skeet <skeet@pobox.com> | 2015-11-03 22:39:08 -0800 |
commit | b6a32e909b1f58f157c19276af233e44627093f4 (patch) | |
tree | ba07d19ca93d4aa01bb4ce3131984447f53cdb4d /csharp/src/Google.Protobuf/WellKnownTypes/TimestampPartial.cs | |
parent | 55ad57a235c009d0414aed1781072adda0c89137 (diff) | |
parent | fb2488225fbd239f7880e3b493cbfd2f19da755b (diff) | |
download | protobuf-b6a32e909b1f58f157c19276af233e44627093f4.tar.gz protobuf-b6a32e909b1f58f157c19276af233e44627093f4.tar.bz2 protobuf-b6a32e909b1f58f157c19276af233e44627093f4.zip |
Merge pull request #923 from jskeet/json-parsing
Implement JSON parsing in C#.
Diffstat (limited to 'csharp/src/Google.Protobuf/WellKnownTypes/TimestampPartial.cs')
-rw-r--r-- | csharp/src/Google.Protobuf/WellKnownTypes/TimestampPartial.cs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/csharp/src/Google.Protobuf/WellKnownTypes/TimestampPartial.cs b/csharp/src/Google.Protobuf/WellKnownTypes/TimestampPartial.cs index 68584358..d284acd6 100644 --- a/csharp/src/Google.Protobuf/WellKnownTypes/TimestampPartial.cs +++ b/csharp/src/Google.Protobuf/WellKnownTypes/TimestampPartial.cs @@ -38,6 +38,8 @@ namespace Google.Protobuf.WellKnownTypes { private static readonly DateTime UnixEpoch = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc); private static readonly long BclSecondsAtUnixEpoch = UnixEpoch.Ticks / TimeSpan.TicksPerSecond; + internal static readonly long UnixSecondsAtBclMinValue = -BclSecondsAtUnixEpoch; + internal static readonly long UnixSecondsAtBclMaxValue = (DateTime.MaxValue.Ticks / TimeSpan.TicksPerSecond) - BclSecondsAtUnixEpoch; /// <summary> /// Returns the difference between one <see cref="Timestamp"/> and another, as a <see cref="Duration"/>. |