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
Closed

DateTime equality uses millis since epoch #150

wonderfly opened this issue Jan 9, 2015 · 3 comments
Assignees
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. 🚨 This issue needs some love. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@wonderfly
Copy link
Contributor

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 wonderfly added type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. imported priority: p2 Moderately-important priority. Fix may not be included in next release. labels Jan 9, 2015
@wonderfly wonderfly self-assigned this Jan 9, 2015
@wonderfly
Copy link
Contributor Author

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

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

@wonderfly
Copy link
Contributor Author

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
Copy link
Contributor Author

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

Status: Fixed

@yoshi-automation yoshi-automation added the 🚨 This issue needs some love. label Apr 6, 2020
clundin25 pushed a commit to clundin25/google-http-java-client that referenced this issue Aug 11, 2022
Fixes googleapis#141 

* Allows to use GCE service credentials to sign blobs (googleapis#141)

* Fix failing test (googleapis#141)

* Improve error reporting (googleapis#141)

* Fix issues for code review (googleapis#141)

* Don't change ServiceAccountSigner method signatures
* Use complete list of imports in ComputeEngineCredentials

* Restore individual assert imports

* No need for IAM_API_ROOT_URL constant

* Add tests for failure cases
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. 🚨 This issue needs some love. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

No branches or pull requests

2 participants