<p:schedule>发送表示前一天的时间戳,时间为13:00而不是当前时间,时间为0:00 </p:schedule>

时间:2013-11-13 10:37:08

标签: jsf-2 primefaces timezone schedule

我在web.xml中提供了以下代码

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

我已使用

更改了默认的TimeZone
TimeZone.setDefault(TimeZone.getTimeZone("GMT"));

在xhtml文件中,我已将时区指定为<p:schedule

的GMT
timeZone="GMT"

但是dateTime被改为其他一些值。当没有给出时区值时工作正常,即;当我把所有东西都作为默认值时。

这是使用fireBug

标识的本地计算机中浏览器发送的日期值
schedule_end    1384606800000
schedule_start  1384002000000

我在bean类中获得的日期是

schedule_start      Sat Nov 09 13:00:00 GMT 2013
schedule_end        Sat Nov 16 13:00:00 GMT 2013

这就是我所期待的

schedule_start      Sat Nov 10 00:00:00 GMT 2013
schedule_end        Sat Nov 17 00:00:00 GMT 2013

在IST时区GMT + 5.30中测试。

0 个答案:

没有答案
相关问题