Created
September 9, 2014 14:56
-
-
Save lordofthejars/c7a0b35b8af38fbb7997 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ZoneId MADRID = ZoneId.of("Europe/Madrid"); | |
| LocalDate date = LocalDate.of(2014, Month.OCTOBER, 20); | |
| LocalTime start = LocalTime.of(9, 45); | |
| LocalTime end = LocalTime.of(10, 30); | |
| Duration duration = Duration.ofMinutes(45); | |
| assertThat(Duration.between(ZonedDateTime.of(date, end, MADRID), ZonedDateTime.of(date, start, MADRID)), is(duration)); | |
| Why it is different? | |
| Expected: is <PT45M> | |
| but: was <PT-45M> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment