Skip to content
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

Merged
merged 4 commits into from
Apr 19, 2017
Merged

Conversation

shinfan
Copy link
Contributor

@shinfan shinfan commented Apr 19, 2017

Fixes #1920

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Apr 19, 2017
@@ -55,6 +57,13 @@ public void maxValue() {
}

@Test
public void fromMicroseconds() {

This comment was marked as spam.

This comment was marked as spam.

@@ -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.

* @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.

@shinfan
Copy link
Contributor Author

shinfan commented Apr 19, 2017

PTAL

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.004%) to 80.836% when pulling 43e0919 on shinfan:datastore into ff8376e on GoogleCloudPlatform:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.01%) to 80.828% when pulling 43e0919 on shinfan:datastore into ff8376e on GoogleCloudPlatform:master.

Copy link
Member

@garrettjonesgoogle garrettjonesgoogle left a 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.

}

/**
* Creates an instance representing the value of {@code Date}

This comment was marked as spam.

@shinfan shinfan merged commit 0c2a6cd into googleapis:master Apr 19, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants