Merge "Fix incorrect GMT offset in display" into pi-dev

This commit is contained in:
TreeHugger Robot
2018-03-28 21:05:15 +00:00
committed by Android (Google) Code Review
2 changed files with 10 additions and 1 deletions

View File

@@ -43,4 +43,13 @@ public class TimeZoneInfoTest {
assertThat(timeZoneInfo.getStandardName()).isEqualTo("Pacific Standard Time");
assertThat(timeZoneInfo.getDaylightName()).isEqualTo("Pacific Daylight Time");
}
@Test
public void getGmtOffset_zoneLordHowe_correctGmtOffset() {
Date date = new Date(1514764800000L); // 00:00 1/1/2018 GMT
Formatter formatter = new Formatter(Locale.US, date);
TimeZoneInfo timeZoneInfo = formatter.format("Australia/Lord_Howe");
assertThat(timeZoneInfo.getGmtOffset().toString()).isEqualTo("GMT+11:00");
}
}