vivek
vivek

Reputation: 53

jsf java asking about time in jsf

my data base have simple date and time but when i pic in UI so time is convert in to GMT . How to convert origional time(DB) .

Upvotes: 0

Views: 122

Answers (1)

Renan
Renan

Reputation: 741

Use <f:convertDateTime/>

Example:

<h:outputText value="#{myBean.myDate}">
  <f:convertDateTime pattern="dd/MM/yyyy" />
</h:outputText>

More info about <f:convertDateTime/> can be found here.

Upvotes: 1

Related Questions