You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Werner Punz <we...@gmail.com> on 2007/06/28 14:34:22 UTC

Re: t:inputCalendar f:convertDateTime

Holger Igel schrieb:
> But how can you solve the daylightsaving problem ? do we have to change
> everytime the timezone attribute ? in germany we could have the following
> values:
> 
> <f:convertDateTime type="both" dateStyle="medium" timeZone="GMT+2"/>
> 
> or
> 
> <f:convertDateTime type="both" dateStyle="medium" timeZone="GMT+1"/>
> 
> Holger
> 
Not sure here, but doesnt the JDK take care of the daylight savings in a
specific timezone by itself?
GMT+1 should be static shouldn´t it?


AW: t:inputCalendar f:convertDateTime DaylightSaving

Posted by Holger Igel <ho...@cosys.de>.
Yes the JDK handles the daylight saving. I found the solution. You have to
use a TimeZone ID like 
Europe/Amsterdam
Europe/Andorra
Europe/Belgrade
Europe/Berlin

Java.util.TimeZone

String ids[] = TimeZone.getAvailableIDs();
		for (int i = 0; i < ids.length; i++) {
			log.debug(ids[i]);
		}

My mistake was to take GMT+1 or GMT+2.
If we are in daylight saving time we have GMT+2 else GMT+1.
If I use 
<f:convertDateTime type="both" dateStyle="medium" timeZone="Europe/Berlin"/>

It works fine !

Regards
Holger Igel




________________________________________
Von: Simon Lessard [mailto:simon.lessard.3@gmail.com] 
Gesendet: Donnerstag, 28. Juni 2007 15:13
An: MyFaces Discussion; werner.punz@gmail.com
Betreff: Re: t:inputCalendar f:convertDateTime

Hello,

Yes, the JDK take care of that. However, there's some potential problems
like you need close to latest JVM to include this year changes on daylight
saving, and there's also an issue with a very specific date around 1930 that
I forgot which is very buggy (selecting the day before)... 


Regards,

~ Simon
On 6/28/07, Werner Punz <we...@gmail.com> wrote:
Holger Igel schrieb:
> But how can you solve the daylightsaving problem ? do we have to change
> everytime the timezone attribute ? in germany we could have the following
> values:
>
> <f:convertDateTime type="both" dateStyle="medium" timeZone="GMT+2"/> 
>
> or
>
> <f:convertDateTime type="both" dateStyle="medium" timeZone="GMT+1"/>
>
> Holger
>
Not sure here, but doesnt the JDK take care of the daylight savings in a 
specific timezone by itself?
GMT+1 should be static shouldn´t it?



Re: t:inputCalendar f:convertDateTime

Posted by Simon Lessard <si...@gmail.com>.
Hello,

Yes, the JDK take care of that. However, there's some potential problems
like you need close to latest JVM to include this year changes on daylight
saving, and there's also an issue with a very specific date around 1930 that
I forgot which is very buggy (selecting the day before)...


Regards,

~ Simon

On 6/28/07, Werner Punz <we...@gmail.com> wrote:
>
> Holger Igel schrieb:
> > But how can you solve the daylightsaving problem ? do we have to change
> > everytime the timezone attribute ? in germany we could have the
> following
> > values:
> >
> > <f:convertDateTime type="both" dateStyle="medium" timeZone="GMT+2"/>
> >
> > or
> >
> > <f:convertDateTime type="both" dateStyle="medium" timeZone="GMT+1"/>
> >
> > Holger
> >
> Not sure here, but doesnt the JDK take care of the daylight savings in a
> specific timezone by itself?
> GMT+1 should be static shouldn´t it?
>
>