Skip to content

Commit

Permalink
Use timezone id where present to generate string value
Browse files Browse the repository at this point in the history
  • Loading branch information
benfortuna committed Feb 27, 2020
1 parent 9d693f3 commit adc21a4
Showing 1 changed file with 6 additions and 1 deletion.
Expand Up @@ -153,7 +153,12 @@ public void setValue(final String value) throws DateTimeParseException {
* {@inheritDoc}
*/
public String getValue() {
return Strings.valueOf(date);
Optional<TzId> tzId = getParameter(Parameter.TZID);
if (tzId.isPresent()) {
return date.toString(tzId.get().toZoneId());
} else {
return Strings.valueOf(date);
}
}

/**
Expand Down

0 comments on commit adc21a4

Please sign in to comment.