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

DateTime equality uses millis since epoch #150

Closed
wonderfly opened this issue Jan 9, 2015 · 3 comments

Comments

@wonderfly
Copy link
Contributor

commented Jan 9, 2015

From rmis...@google.com on August 21, 2012 11:43:30

The following unit test fails:

DateTime dateTime1 = new DateTime("2011-01-01");
Thread.sleep(10);
DateTime dateTime2 = new DateTime("2011-01-01");
assertEquals(dateTime1, dateTime2);

Its because DateTime.equals contains:
return dateOnly == other.dateOnly && value == other.value;

where value is "number of ms since the Unix epoch"

Original issue: http://code.google.com/p/google-http-java-client/issues/detail?id=150

@wonderfly

This comment has been minimized.

Copy link
Contributor Author

commented Jan 9, 2015

From rmis...@google.com on August 21, 2012 12:35:09

Labels: -Milestone-Version1.12.0 Milestone-Version1.11.0

@wonderfly

This comment has been minimized.

Copy link
Contributor Author

commented Jan 9, 2015

From yan...@google.com on August 22, 2012 12:52:47

http://codereview.appspot.com/6485048

Summary: DateTime equality uses millis since epoch
Status: Started
Owner: yan...@google.com
Cc: -yan...@google.com rmis...@google.com
Labels: Component-Util

@wonderfly

This comment has been minimized.

Copy link
Contributor Author

commented Jan 9, 2015

From yan...@google.com on August 22, 2012 13:35:22

Status: Fixed

@wonderfly wonderfly closed this Jan 9, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.