myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Black <pelican5...@yahoo.com>
Subject Time difference 30 minutes. Is it a bug?
Date Wed, 23 Jul 2008 07:20:41 GMT


 

I am using 

myfaces-1.2.3 

Tomcat 6.0.16 

Fedora Linux Server

java 1.6.0_02

 

In my index.jsp file

 

<h:inputText id="fromTime"

 
value="#{handler.alphaDate}">

 
<f:convertDateTime type="time"

 
timeZone="GMT+8" pattern="HH:mm"/>

</h:inputText>

 

In p100.jsp

<h:outputText

 
value="#{handler.alphaDate}">

 
<f:convertDateTime

 
timeZone="GMT+8"

  pattern="dd MMM
yyyy HH:mm:ss"/>

</h:outputText>

 

In Handler.java

...


private java.util.Date alphaDate;

 ...

  public void
setAlphaDate(java.util.Date alphaDate)

  {

   
log.info("inside setAlphaDate");

   
log.info("alphaDate = " + alphaDate);

    this.alphaDate =
alphaDate;

  }

  public
java.util.Date getAlphaDate()

  { return alphaDate;
}

 

 

In short, I input the time in the first screen (index.jsp)
and displayed the data again in (p100.jsp).

It is working fine.

If I input 01:00 it will display

01 Jan 1970 01:00

[OK] 


However, when I viewed the log file in order to debug the values, I found that the value is
differ by 30 minutes.

 

Jul 23, 2008 3:09:36 PM s559.Handler setAlphaDate

INFO: alphaDate = Thu Jan 01 04:30:00 SGT 1970

 

If my program is directly using the data entered in the
first screen, it is working fine. But in my program I need to manipulate the entered
data and when I displayed the data again, it is different by 30 minutes.

 

Is it a bug?




      
Mime
View raw message