From 16513425019cf396d952f0df454a26f2fa26c1ba Mon Sep 17 00:00:00 2001 From: Thomas Van Lenten Date: Thu, 12 Jan 2017 16:00:13 -0500 Subject: Revert "Fix Timestamps with dates before the Unix epoch that contain fractional seconds." --- objectivec/GPBWellKnownTypes.m | 9 --------- 1 file changed, 9 deletions(-) (limited to 'objectivec/GPBWellKnownTypes.m') diff --git a/objectivec/GPBWellKnownTypes.m b/objectivec/GPBWellKnownTypes.m index 83b1c833..ed798a2e 100644 --- a/objectivec/GPBWellKnownTypes.m +++ b/objectivec/GPBWellKnownTypes.m @@ -50,15 +50,6 @@ static int32_t SecondsAndNanosFromTimeIntervalSince1970(NSTimeInterval time, int64_t *outSeconds) { NSTimeInterval seconds; NSTimeInterval nanos = modf(time, &seconds); - - // Per Timestamp.proto, nanos is non-negative and "Negative second values with - // fractions must still have non-negative nanos values that count forward in - // time. Must be from 0 to 999,999,999 inclusive." - if (nanos < 0) { - --seconds; - nanos = 1.0 + nanos; - } - nanos *= 1e9; *outSeconds = (int64_t)seconds; return (int32_t)nanos; -- cgit v1.2.3