Check TimeZone equality using equals

Java != does not work like python !=

Change-Id: Iab7e3f6e32580c155fe7d4880ca3b6cba2bb2046
This commit is contained in:
Craig Bryant 2016-02-04 13:14:21 -07:00
parent 746b45e7d2
commit 9e0f8bb9fd

View File

@ -62,8 +62,8 @@ public class ConversionsTest {
public void testDateTimeShouldNotEqualDifferentTZImplicit() {
// This test fails if the timezone of the JVM is UTC so skip
// it in that case
if (TimeZone.getDefault() != TimeZone.getTimeZone("UTC")) {
// it in that case
if (!TimeZone.getDefault().equals(TimeZone.getTimeZone("UTC"))) {
final DateTime now = DateTime.now();
assertNotEquals(now, Conversions.variantToDateTime(now));
}