Created
June 16, 2020 18:08
-
-
Save karl82/17c747a20bf60343d658f77740b4a462 to your computer and use it in GitHub Desktop.
Instant.parse difference between JDK11 and JDK13+
This file contains 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
import java.time.Instant; | |
import org.junit.jupiter.params.ParameterizedTest; | |
import org.junit.jupiter.params.provider.ValueSource; | |
public class InstantParseTest { | |
@ParameterizedTest | |
@ValueSource(strings = {"2019-12-20T00:00:00+00:00", "2019-12-19T16:00:00-08:00", "2019-12-20T00:00:00Z"}) | |
public void parse(String text) { | |
System.out.println(Instant.parse(text)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment