Reset TimeZone after test

This commit is contained in:
Gary Gregory 2022-12-07 09:40:56 -05:00
parent c92aa75f35
commit f55164f28e
1 changed files with 3 additions and 1 deletions

View File

@ -32,6 +32,7 @@ import java.util.TimeZone;
import org.apache.commons.lang3.AbstractLangTest;
import org.junit.jupiter.api.Test;
import org.junitpioneer.jupiter.DefaultTimeZone;
/**
* TestCase for DurationFormatUtils.
@ -106,8 +107,9 @@ public class DurationFormatUtilsTest extends AbstractLangTest {
//bruteForce(1996, 1, 29, "M", Calendar.MONTH); // this will fail
}
// Attempting to test edge cases in DurationFormatUtils.formatPeriod
/** Attempting to test edge cases in DurationFormatUtils.formatPeriod. */
@Test
@DefaultTimeZone(TimeZones.GMT_ID)
public void testEdgeDurations() {
// This test case must use a time zone without DST
TimeZone.setDefault(FastTimeZone.getGmtTimeZone());