artiya4u / google-http-java-client

Automatically exported from code.google.com/p/google-http-java-client
0 stars 0 forks source link

DateTime equality uses millis since epoch #150

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
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 reported on code.google.com by rmis...@google.com on 21 Aug 2012 at 6:43

GoogleCodeExporter commented 9 years ago

Original comment by rmis...@google.com on 21 Aug 2012 at 7:35

GoogleCodeExporter commented 9 years ago
http://codereview.appspot.com/6485048

Original comment by yan...@google.com on 22 Aug 2012 at 7:52

GoogleCodeExporter commented 9 years ago

Original comment by yan...@google.com on 22 Aug 2012 at 8:35