-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace DateTime with Timestamp #1947
Conversation
@@ -55,6 +57,13 @@ public void maxValue() { | |||
} | |||
|
|||
@Test | |||
public void fromMicroseconds() { |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
@@ -730,46 +729,4 @@ public void testDelete() { | |||
assertNull(keys.next()); | |||
assertFalse(keys.hasNext()); | |||
} | |||
|
|||
@Test | |||
public void testRunInTransaction() { |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
* @throws IllegalArgumentException if the timestamp is outside the representable range | ||
*/ | ||
public static Timestamp ofTimeMicroseconds(long microseconds) { | ||
long seconds = microseconds / 1000000L; |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
PTAL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM after you fix the doc nits
@@ -74,6 +79,38 @@ public static Timestamp ofTimeSecondsAndNanos(long seconds, int nanos) { | |||
} | |||
|
|||
/** | |||
* Creates an instance representing the value of {@code microseconds} |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
} | ||
|
||
/** | ||
* Creates an instance representing the value of {@code Date} |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Fixes #1920