Skip to content

Commit 3c77aca

Browse files
committed
ZonedDateTime ParamProvider toString implementation
1 parent c01b0b5 commit 3c77aca

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

neo-starter/src/main/java/com/neoteric/starter/jersey/time/ZonedDateTimeConverterProvider.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import java.lang.annotation.Annotation;
1010
import java.lang.reflect.Type;
1111
import java.time.ZonedDateTime;
12+
import java.time.format.DateTimeFormatter;
1213
import java.time.format.DateTimeParseException;
1314

1415
@Singleton
@@ -41,7 +42,11 @@ public ZonedDateTime fromString(String value) {
4142

4243
@Override
4344
public String toString(ZonedDateTime value) {
44-
return null;
45+
if (value == null) {
46+
return null;
47+
}
48+
//TODO: Use injected formatter
49+
return value.format(DateTimeFormatter.ISO_INSTANT);
4550
}
4651
}
4752
}

0 commit comments

Comments
 (0)