myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Guy Bashan <guy.bas...@gmail.com>
Subject RE: [Faces][Core]
Date Tue, 03 Jun 2008 15:35:57 GMT
Thanks for your answer,
Actually I was trying using GMT (UTC), but it still does the time
shifting...

I think I will simply fall back to simple java to show this specific date.

Thanks,
Guy.

-----Original Message-----
From: Mike Kienenberger [mailto:mkienenb@gmail.com] 
Sent: Tuesday, June 03, 2008 1:30 AM
To: MyFaces Discussion
Subject: Re: [Faces][Core]

Some ideas:

1) Use GMT (or is it UTC?) and don't show the timezone in the output
2) subclass convertDateTime to have a null timezone
3) write your own converter

I'd probably go with 1)

On 6/2/08, Scott Belnap <scott_belnap@byu.edu> wrote:
> Guy,
>
>  If you want to just display what is in the database then don't use the
>  convertDateTime tag.  The convertDateTime tag is used to convert the
>  Date into a desired format or time zone.
>
>
>  Scott
>
>
>  On Mon, 2008-06-02 at 15:44 -0600, Guy Bashan wrote:
>  > Thanks for your replay,
>  > That is exactly my problem, I don't want to use timeZone, and I don't
want
>  > java to do any shifting on the time using a default timeZone.
>  > For example, I have a date in db: 1/1/2008 00:00.
>  > I want the date to be shown exactly like that, without any timeZone
>  > shifting.
>  > I do want that the date will be formatted according to the given
locale.
>  >
>  > Something like this:
>  > <f:convertDateTime locale="#{appBean.userLanguageLocale}" type="both"
>  > timeZone="NONE" />
>  >
>  > Is it possible? Or will I have to use java code for that?
>  >
>  > Thanks,
>  > Guy.
>  >
>  > -----Original Message-----
>  > From: Christopher Cudennec [mailto:SmutjeJim@gmx.net]
>  > Sent: Tuesday, June 03, 2008 12:05 AM
>  > To: MyFaces Discussion
>  > Subject: Re: [Faces][Core]
>  >
>  > Hi Guy,
>  >
>  > did you have look at Sun's documentation? You can pass a time zone to
>  > the converter. See
>  >
http://java.sun.com/javaee/javaserverfaces/1.1_01/docs/tlddocs/f/convertDate
>  > Time.html
>  > for more information.
>  >
>  > Cheers,
>  >
>  > Christopher
>  >
>  > Guy Bashan schrieb:
>  > > Hi,
>  > >
>  > >
>  > >
>  > > Is it possible not to make any time zone shifting in
<f:convertDateTime>.
>  > >
>  > > For example:
>  > >
>  > > <h:outputText
>  > > value="#{cmp_summary.cmpCampaign.cmpDeliveryLimits.startDate}">
>  > >
>  > >             <f:convertDateTime locale="#{appBean.userLanguageLocale}"
>  > > type="both" />
>  > >
>  > > </h:outputText>
>  > >
>  > >
>  > >
>  > > I want to format the date according to the locale, but that no time
>  > shifting
>  > > will take place, since the exact value in db should be shown on
screen.
>  > >
>  > >
>  > >
>  > > Thanks,
>  > >
>  > > Guy.
>  > >
>  > >
>  > >
>  > >
------------------------------------------------------------------------
>  > >
>  > >
>  > > No virus found in this incoming message.
>  > > Checked by AVG.
>  > > Version: 8.0.100 / Virus Database: 269.24.4/1478 - Release Date:
>  > 02.06.2008 07:12
>  > >
>  >
>
>


Mime
View raw message