formatting
This commit is contained in:
parent
068a21f32a
commit
d12be45fe1
|
@ -45,8 +45,15 @@ public class DaylightSavingTimeExamplesTest {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void prettyPrint(TimeZone tz) {
|
private void prettyPrint(TimeZone tz) {
|
||||||
System.out.println(
|
|
||||||
String.format(" Zone ID = %s (%s)\n" + " RawOffset = %s minutes\n" + " DST = %s minutes\n" + " -----------------------------------------", tz.getID(), tz.getDisplayName(), tz.getRawOffset() / 60000, tz.getDSTSavings() / 60000));
|
//@formatter:off
|
||||||
|
System.out.println(String.format(
|
||||||
|
" Zone ID = %s (%s)\n"
|
||||||
|
+ " RawOffset = %s minutes\n"
|
||||||
|
+ " DST = %s minutes\n"
|
||||||
|
+ " -----------------------------------------",
|
||||||
|
tz.getID(), tz.getDisplayName(), tz.getRawOffset()/60000, tz.getDSTSavings()/60000));
|
||||||
|
//@formatter:on
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
|
@ -35,10 +35,14 @@ public class DaylightSavingTimeJavaTimeExamplesTest {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void prettyPrint(ZonedDateTime zdt) {
|
private void prettyPrint(ZonedDateTime zdt) {
|
||||||
System.out.println(String.format(" ZonedDateTime = %s\n" + " Zone ID = %s (%s)\n" + " RawOffset = %s minutes\n" + " -----------------------------------------", zdt, zdt.getZone(), zdt.getZone()
|
//@formatter:off
|
||||||
.getId(),
|
System.out.println(String.format(
|
||||||
zdt.getOffset()
|
" ZonedDateTime = %s\n"
|
||||||
.getTotalSeconds() / 60));
|
+ " Zone ID = %s (%s)\n"
|
||||||
|
+ " RawOffset = %s minutes\n"
|
||||||
|
+ " -----------------------------------------",
|
||||||
|
zdt, zdt.getZone(), zdt.getZone().getId(), zdt.getOffset().getTotalSeconds()/60));
|
||||||
|
//@formatter:on
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
Loading…
Reference in New Issue