webtier@glassfish.java.net

Re: [webtier] ConvertDateTime: one day deleted in view forms

From: <webtier_at_javadesktop.org>
Date: Tue, 09 Dec 2008 12:24:52 PST

Hi Ryan,
Thank you for quick response.

> Strange. The view technology should have *no* impact
> on how
> convertDateTime behaves.

Ok, just facts:

We decided to start to use facelets so I asked programmer from Ukraine (Kiev) make all related changes to migrate our applications from JSP to Facelets.
After migration was done I have found the issue already in two applications that I evaluated after getting updates from Kiev.

DataTime field states:
1) initialized date such way that time part of the field is zero.
2) user didn't change the date at all but i getting date with time equal 17:00 GMT-5
and date on day before comparing to date that was defined before.

And interesting thing is that Kiev located on (GMT+2) and I'm located on (GMT-5).

24 - 7 = 17

So I don't understand two things:

1) why time is always show 17:00 (should migration take place in other place than Kiev we would get different time?)
2) what else beside migration to facelets could be reason to issue appears

> Did you set the
> 'javax.faces.DATETIMECONVERTER_DEFAULT_TIMEZONE_IS_SYS
> TEM_TIMEZONE'
> context init parameter in your web.xml to true?

I didn't know about this parameter and when I put it in place everything started worked as expected.

> This is the fix Ed was referring to. Instead of
> defaulting to GMT, if
> this option is enabled,
> it will use the container's timezone.

It's great option!

Because your suggestion resolved my issue I don't need to know answers on my two questions described above. In fact I just tried to provide more light on this topic.

Best Regards,
Vladimir
[Message sent by forum member 'vladperl' (vladperl)]

http://forums.java.net/jive/thread.jspa?messageID=320865