diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/renderers/ListRenderer.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/renderers/ListRenderer.java index 95826f632..3d758f11f 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/renderers/ListRenderer.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/renderers/ListRenderer.java @@ -40,8 +40,8 @@ public class ListRenderer extends ResourceRenderer { XhtmlNode tr = t.tr(); XhtmlNode td = tr.td(); if (list.has("date")) { - td.tx(/*!#*/"Date: "+list.get("date").dateTimeValue().toHumanDisplay()); - } + td.tx(/*!#*/"Date: "+context.toStr(list.get("date").dateTimeValue())); + } if (list.has("mode")) { td.tx(/*!#*/"Mode: "+list.get("mode").primitiveValue()); } @@ -113,7 +113,7 @@ public class ListRenderer extends ResourceRenderer { XhtmlNode t = x.table("clstu"); XhtmlNode tr = t.tr(); if (list.hasDate()) { - tr.td().tx(/*!#*/"Date: "+list.getDate().toLocaleString()); + tr.td().tx(/*!#*/"Date: "+context.toStr(list.getDateElement())); } if (list.hasMode()) { tr.td().tx(/*!#*/"Mode: "+list.getMode().getDisplay()); diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/renderers/ProvenanceRenderer.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/renderers/ProvenanceRenderer.java index 4598a0d33..4872cd1da 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/renderers/ProvenanceRenderer.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/renderers/ProvenanceRenderer.java @@ -55,7 +55,7 @@ public class ProvenanceRenderer extends ResourceRenderer { if (prv.hasRecorded()) { tr = t.tr(); tr.td().tx(/*!#*/"Recorded"); - tr.td().addText(prv.getRecordedElement().toHumanDisplay()); + tr.td().addText(context.toStr(prv.getRecordedElement())); } if (prv.hasPolicy()) { tr = t.tr(); diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/renderers/utils/RenderingContext.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/renderers/utils/RenderingContext.java index cf4ee8f30..d321df9f2 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/renderers/utils/RenderingContext.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/renderers/utils/RenderingContext.java @@ -18,6 +18,7 @@ import org.hl7.fhir.r5.context.IWorkerContext; import org.hl7.fhir.r5.elementmodel.Element; import org.hl7.fhir.r5.fhirpath.FHIRPathEngine.IEvaluationContext; import org.hl7.fhir.r5.model.Base; +import org.hl7.fhir.r5.model.BaseDateTimeType; import org.hl7.fhir.r5.model.DateTimeType; import org.hl7.fhir.r5.model.DomainResource; import org.hl7.fhir.r5.model.Extension; @@ -745,7 +746,7 @@ public class RenderingContext extends RenderingI18nContext { return nf.format(v); } - public String toStr(DateTimeType dt) { + public String toStr(BaseDateTimeType dt) { return dt.toHumanDisplay(); }