primefaces calendar: wrong date entry

后端 未结 8 829
心在旅途
心在旅途 2021-02-07 21:49

Using jsf 2.2.0.

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 manag

8条回答
  •  执笔经年
    2021-02-07 22:29

    Maybe it is because you didn't insert the hours. For example in this case

    
    
    

    the hour will come as 00:00 of the actual day. And because the timezone (-02:00), the hour will appear as 22:00 of the day before the actual day. The correct thing to do is

    
    
    

    The hour will appear, so the timezone will make the correct calculations

提交回复
热议问题