diff --git a/main/src/com/google/refine/browsing/DecoratedValue.java b/main/src/com/google/refine/browsing/DecoratedValue.java index 398d8cb34..90bde0930 100644 --- a/main/src/com/google/refine/browsing/DecoratedValue.java +++ b/main/src/com/google/refine/browsing/DecoratedValue.java @@ -33,12 +33,14 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. package com.google.refine.browsing; +import java.time.OffsetDateTime; import java.util.Properties; import org.json.JSONException; import org.json.JSONWriter; import com.google.refine.Jsonizable; +import com.google.refine.util.StringUtils; /** * Store a value and its text label, in case the value is not a string itself. @@ -52,8 +54,12 @@ public class DecoratedValue implements Jsonizable { final public String label; public DecoratedValue(Object value, String label) { - this.value = value; - this.label = label; + if (value instanceof OffsetDateTime) { + this.value = StringUtils.toString(value); + } else { + this.value = value; + } + this.label = label; } @Override