Skip to content

Commit 9d464cc

Browse files
committed
Instant support for DefaultGrailsTagDateHelper
1 parent 1580789 commit 9d464cc

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

grails-gsp/plugin/src/main/groovy/org/grails/plugins/web/DefaultGrailsTagDateHelper.groovy

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,8 @@ class DefaultGrailsTagDateHelper implements GrailsTagDateHelper {
134134
zonedDateTime = ZonedDateTime.of(date, ZoneId.systemDefault())
135135
} else if (date instanceof LocalDate) {
136136
zonedDateTime = ZonedDateTime.of(date, LocalTime.MIN, ZoneId.systemDefault())
137+
} else if (date instanceof Instant) {
138+
zonedDateTime = ZonedDateTime.ofInstant(date, ZoneId.systemDefault())
137139
} else if (date instanceof OffsetDateTime) {
138140
zonedDateTime = ((OffsetDateTime) date).toZonedDateTime()
139141

0 commit comments

Comments
 (0)