Correción de timeZone al mostrar fechas convertidas con JSF.

This commit is contained in:
Marcos Garcia Nuñez
2019-12-23 15:47:36 +01:00
parent 7cf4a93c2c
commit 74ec842f54
3 changed files with 11 additions and 4 deletions

View File

@@ -18,6 +18,10 @@
<param-name>javax.faces.FACELETS_SKIP_COMMENTS</param-name>
<param-value>true</param-value>
</context-param>
<context-param>
<param-name>javax.faces.DATETIMECONVERTER_DEFAULT_TIMEZONE_IS_SYSTEM_TIMEZONE</param-name>
<param-value>true</param-value>
</context-param>
<context-param>
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
<param-value>client</param-value>

View File

@@ -29,11 +29,15 @@
rowsPerPageTemplate="10,20,30,40">
<p:column headerText="Fecha" width="90px;">
<h:outputText value="#{v.date}" />
<h:outputText value="#{v.date}">
<f:convertDateTime type="date" pattern="dd/MM/yyyy" timeStyle="short" />
</h:outputText>
</p:column>
<p:column headerText="Hora" width="90px;">
<h:outputText value="#{v.time}" />
<h:outputText value="#{v.time}">
<f:convertDateTime type="time" pattern="HH:mm" />
</h:outputText>
</p:column>
<p:column headerText="Paciente" width="auto">

View File

@@ -57,7 +57,6 @@ public class VisitListMBean extends ManagedBeanBase implements Serializable {
}
public void showData() {
}
public Date getSelectedDate() {