primefaces calendar:错误的日期条目 [英] primefaces calendar: wrong date entry

查看:145
本文介绍了primefaces calendar:错误的日期条目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用jsf 2.2.0。

Using jsf 2.2.0.

对于所有日期,似乎删除了一天。当我点击8 nov时,它显示11/08/2011。
然后它将2011年11月7日存储在我的托管bean的日期字段中。

For all the date, it seems to remove one day. When I click on 8 nov, it displays 11/08/2011. But then it stores Nov 7, 2011 in my Date field in my managed bean.

我住在新加坡,想知道这是否与时区有关。

I live in singapore, wondering if it's an issue with the timezone.

推荐答案

尝试将此添加到您的web.xml

try adding this to your web.xml

<context-param>
    <param-name>javax.faces.DATETIMECONVERTER_DEFAULT_TIMEZONE_IS_SYSTEM_TIMEZONE</param-name>
    <param-value>true</param-value>
</context-param>

这篇关于primefaces calendar:错误的日期条目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆