[英]f:convertDateTime doesn`t convert all Date in h:inputText
我想用h:inputText更改日期:
<h:inputText value="#{backbean.entity.time}">
<f:convertDateTime pattern="dd/MM/yyyy HH:mm" timeZone="Atlantic/Canary" /> </h:inputText>
在服務器中,我的TimeZone位於Europe/Madrid
,問題是當我僅將此返回時間轉換器的小時更改為我的TimeZone時,但是如果我將小時設置為23,則返回00,但不更改日期。
任何想法?
就我而言,這不會造成任何問題。 它根據時區更新日期和時間。 嘗試以下代碼:
<h:form>
<h:inputText value="#{testController.today}">
<f:convertDateTime pattern="dd/MM/yyyy HH:mm" timeZone="Atlantic/Canary" />
</h:inputText>
<br/>
<h:commandButton action="#{testController.submit()}" value="Submit"/>
</h:form>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.