We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d4906b7 commit 06f172aCopy full SHA for 06f172a
src/test/java/org/gitlab4j/api/TestISO8601.java
@@ -0,0 +1,22 @@
1
+package org.gitlab4j.api;
2
+
3
+import static org.junit.Assert.assertEquals;
4
5
+import java.text.ParseException;
6
+import java.util.Date;
7
8
+import org.gitlab4j.api.utils.ISO8601;
9
+import org.junit.Test;
10
11
+public class TestISO8601 {
12
13
+ private static final String SPACEY_GITLAB_DATE = "2018-03-12 10:16:46 +0800";
14
+ private static final String ISO8601_GITLAB_DATE ="2018-03-12T10:16:46+0800";
15
16
+ @Test
17
+ public void testGitlabDateParse() throws ParseException {
18
+ Date spaceyDate = ISO8601.toDate(SPACEY_GITLAB_DATE);
19
+ Date gitlabDate = ISO8601.toDate(ISO8601_GITLAB_DATE);
20
+ assertEquals(spaceyDate, gitlabDate);
21
+ }
22
+}
0 commit comments