You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Chris Hane <ch...@gmail.com> on 2007/06/12 23:20:13 UTC

and hour/minute oddity

When I select add an <tr:inputDate> tag with a converter that displays the 
hours/minutes also, the hours are not correct.  For example, in the demo 
inputDate.jspx, change the last inputDate to be:

    <tr:inputDate id="mdf5" value="2004/09/06" label="attached converter">
       <tr:convertDateTime secondaryPattern="d/M/yyyy hh:mm"
                           pattern="yyyy/M/d hh:mm" />
    </tr:inputDate>


I added the "hh:mm" to the converter.  When you select a day in the current 
month, the time will default to the current time.  Select another day in 
the current month and the time stays the same.

Select a day in the past (say January) and the time increases by 1 hour. 
Select another day in January and the time increases again by 1 hour.

Is this a known issue?  Are there any workarounds?

Is there something else I should be looking at for this issue?

I'm running everything on my development box:
Windows XP
Jboss 4.0.x
Firefox 2.x
Java 1.5.x
MyFaces 1.latest
Facelets 1.11

My local machine timezone is EST.

Chris....

[Trinidad] and hour/minute oddity

Posted by Chris Hane <ch...@gmail.com>.
When I select add an <tr:inputDate> tag with a converter that displays the 
hours/minutes also, the hours are not correct.  For example, in the demo 
inputDate.jspx, change the last inputDate to be:

    <tr:inputDate id="mdf5" value="2004/09/06" label="attached converter">
       <tr:convertDateTime secondaryPattern="d/M/yyyy hh:mm"
                           pattern="yyyy/M/d hh:mm" />
    </tr:inputDate>


I added the "hh:mm" to the converter.  When you select a day in the current 
month, the time will default to the current time.  Select another day in 
the current month and the time stays the same.

Select a day in the past (say January) and the time increases by 1 hour. 
Select another day in January and the time increases again by 1 hour.

Is this a known issue?  Are there any workarounds?

Is there something else I should be looking at for this issue?

I'm running everything on my development box:
Windows XP
Jboss 4.0.x
Firefox 2.x
Java 1.5.x
MyFaces 1.latest
Facelets 1.11

My local machine timezone is EST.

Chris....


Re: and hour/minute oddity

Posted by Adam Winer <aw...@gmail.com>.
The issue here (I'm guessing) is that the field is goingin and out of
daylight savings time, and some bit
of code isn't accounting for that.  That's why when
you pick a date back in January, you get a bump
in time - because January is really one hour different
from June.

-- Adam


On 6/13/07, Chris Hane <ch...@gmail.com> wrote:
>
>
>
> Adam Winer wrote:
> > On 6/12/07, Chris Hane <ch...@gmail.com> wrote:
> >> When I select add an <tr:inputDate> tag with a converter that displays
> >> the
> >> hours/minutes also, the hours are not correct.  For example, in the
> demo
> >> inputDate.jspx, change the last inputDate to be:
> >>
> >>     <tr:inputDate id="mdf5" value="2004/09/06" label="attached
> >> converter">
> >>        <tr:convertDateTime secondaryPattern="d/M/yyyy hh:mm"
> >>                            pattern="yyyy/M/d hh:mm" />
> >>     </tr:inputDate>
> >>
> >>
> >> I added the "hh:mm" to the converter.  When you select a day in the
> >> current
> >> month, the time will default to the current time.  Select another day
> in
> >> the current month and the time stays the same.
> >>
> >> Select a day in the past (say January) and the time increases by 1
> hour.
> >> Select another day in January and the time increases again by 1 hour.
> >>
> >> Is this a known issue?  Are there any workarounds?
> >>
> >> Is there something else I should be looking at for this issue?
> >>
> >> I'm running everything on my development box:
> >> Windows XP
> >> Jboss 4.0.x
> >> Firefox 2.x
> >> Java 1.5.x
> >> MyFaces 1.latest
> >> Facelets 1.11
> >>
> >> My local machine timezone is EST.
> >
> > Actually, I suspect your timezone is EDT, and that this
> > is a daylight savings time issue.
> >
> > -- Adam
> >
>
> Adam - thanks for the response.  You were right, it was EDT.
>
> The whole date thing has me a little perplexed.
>
> I setup the following:
>    - computer time (GMT - made sure DST was off)
>    - added GMT to inputDate
>
> Voila, no time change.  My next step is to setup the server/pages this way
> and test on a client that is not GMT.  Will the time be changed since the
> client has a different timezone?
>
> I've done a little google searching; but feel I'm missing the keywords I
> should be looking for.  Suggestions on what I can read to understand
> dates/timezone better and how they impact the various JSF/java components?
>
> Thanks,
> Chris....
>

Re: and hour/minute oddity

Posted by Chris Hane <ch...@gmail.com>.

Adam Winer wrote:
> On 6/12/07, Chris Hane <ch...@gmail.com> wrote:
>> When I select add an <tr:inputDate> tag with a converter that displays 
>> the
>> hours/minutes also, the hours are not correct.  For example, in the demo
>> inputDate.jspx, change the last inputDate to be:
>>
>>     <tr:inputDate id="mdf5" value="2004/09/06" label="attached 
>> converter">
>>        <tr:convertDateTime secondaryPattern="d/M/yyyy hh:mm"
>>                            pattern="yyyy/M/d hh:mm" />
>>     </tr:inputDate>
>>
>>
>> I added the "hh:mm" to the converter.  When you select a day in the 
>> current
>> month, the time will default to the current time.  Select another day in
>> the current month and the time stays the same.
>>
>> Select a day in the past (say January) and the time increases by 1 hour.
>> Select another day in January and the time increases again by 1 hour.
>>
>> Is this a known issue?  Are there any workarounds?
>>
>> Is there something else I should be looking at for this issue?
>>
>> I'm running everything on my development box:
>> Windows XP
>> Jboss 4.0.x
>> Firefox 2.x
>> Java 1.5.x
>> MyFaces 1.latest
>> Facelets 1.11
>>
>> My local machine timezone is EST.
> 
> Actually, I suspect your timezone is EDT, and that this
> is a daylight savings time issue.
> 
> -- Adam
> 

Adam - thanks for the response.  You were right, it was EDT.

The whole date thing has me a little perplexed.

I setup the following:
   - computer time (GMT - made sure DST was off)
   - added GMT to inputDate

Voila, no time change.  My next step is to setup the server/pages this way 
and test on a client that is not GMT.  Will the time be changed since the 
client has a different timezone?

I've done a little google searching; but feel I'm missing the keywords I 
should be looking for.  Suggestions on what I can read to understand 
dates/timezone better and how they impact the various JSF/java components?

Thanks,
Chris....

Re: and hour/minute oddity

Posted by Adam Winer <aw...@gmail.com>.
On 6/12/07, Chris Hane <ch...@gmail.com> wrote:
> When I select add an <tr:inputDate> tag with a converter that displays the
> hours/minutes also, the hours are not correct.  For example, in the demo
> inputDate.jspx, change the last inputDate to be:
>
>     <tr:inputDate id="mdf5" value="2004/09/06" label="attached converter">
>        <tr:convertDateTime secondaryPattern="d/M/yyyy hh:mm"
>                            pattern="yyyy/M/d hh:mm" />
>     </tr:inputDate>
>
>
> I added the "hh:mm" to the converter.  When you select a day in the current
> month, the time will default to the current time.  Select another day in
> the current month and the time stays the same.
>
> Select a day in the past (say January) and the time increases by 1 hour.
> Select another day in January and the time increases again by 1 hour.
>
> Is this a known issue?  Are there any workarounds?
>
> Is there something else I should be looking at for this issue?
>
> I'm running everything on my development box:
> Windows XP
> Jboss 4.0.x
> Firefox 2.x
> Java 1.5.x
> MyFaces 1.latest
> Facelets 1.11
>
> My local machine timezone is EST.

Actually, I suspect your timezone is EDT, and that this
is a daylight savings time issue.

-- Adam