myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Simon Kitching <simon.kitch...@rhe.co.nz>
Subject Re: date in jenia calendar is off by one
Date Mon, 05 Mar 2007 23:59:44 GMT
raindogs wrote:
> I'm attempting to implement the jenia calendar and, while it all seemed great
> at first, I now realize that I'm getting an off-by-one error on the day. In
> the test I just ran, I selected March 15th as the date. The input box
> displayed "03/15/2007", but the value that actually gets passed into the
> backing bean is "Wed Mar 14 19:00:00 CDT 2007".
> 
> I'm really scratching my head on this one, as I haven't heard of anyone else
> having this problem. All of the relevant info is below, any help would be
> much appreciated.

The default JSF date converter always uses UTC. Note that this is 
required by the JSF spec (and earlier versions of MyFaces were not 
compliant).

March 15 00:00 UTC --> Mar 14 19:00 CDT

If you don't want UTC (and I bet you do not) then try attaching an 
appropriate converter that uses the local timezone; I believe there is 
one in either Tomahawk or the tomahawk sandbox..

Regards,

Simon

Mime
View raw message