FYI, the convertDateTime converter from Seam defaults to the user's locale instead of UTC.
On 3/6/07, raindogs <[EMAIL PROTECTED]> wrote:
I'm sorry if my original post made it sound like I was saying there was something wrong with the Jenia Calendar. My intention was to show what I was doing and ask if someone could spot how I was using it incorrectly. Thanks a lot for the tip on the timezone issue, it all worked fine once I sorted that out. Alex Madhav Bhargava-2 wrote: > > > It is not a problem with Jenia calendar. It is the timezone that is used > to convert the submitted value at the server side. > > To make sure that the server JVM timezone is taken use > <s:convertDateTime> tag. Now you can set the system timezone to anything > that you want. > > > > > ~madhav > > > > > ________________________________ > > From: Adrian Mitev [mailto:[EMAIL PROTECTED] > > Sent: Tuesday, March 06, 2007 5:32 AM > To: MyFaces Discussion > Subject: Re: date in jenia calendar is off by one > > > > > It is obvious that the problem is not in jenia callendar > > 2007/3/6, raindogs <[EMAIL PROTECTED]>: > > > I'm attempting to implement the jenia calendar and, while it all seemed > great > at first, I now realize that I'm getting an off-by-one error on the day. > In > the test I just ran, I selected March 15th as the date. The input box > > displayed "03/15/2007", but the value that actually gets passed into the > backing bean is "Wed Mar 14 19:00:00 CDT 2007". > > I'm really scratching my head on this one, as I haven't heard of anyone > else > > having this problem. All of the relevant info is below, any help would > be > much appreciated. > > Thanks, > Alex > > -------------------------- > JSP Page snippet > -------------------------- > ** > <h:outputText value="Activation Date" /> > > <h:inputText value="#{locationForm.activationDate}" > id="activationDate" > > <f:convertDateTime pattern="MM/dd/yyyy"/> > </h:inputText> > > > <h:outputText value="" escape="false"/> > <jp:popupCalendar for="activationDate" > format="MM/dd/yyyy"> > <h:outputText value="Choose Date"/> > > </jp:popupCalendar> > ** > > ------------------------------------------------------------- > Backing Bean Methods > (activationDate is delared as java.util.Date) > ---------------------------------------------------------- > > > public Date getActivationDate() { > return this.activationDate; > } > > public void setActivationDate(Date activationDate) { > this.activationDate = activationDate; > } > > > ----------------------- > WEB-INF\lib > ----------------------- > ajax4jsf.jar > commons-beanutils-1.7.0.jar > commons-codec-1.3.jar > commons-collections-3.1.jar > commons-digester-1.6.jar > commons-el-1.0.jar > > commons-fileupload.jar > commons-lang-2.1.jar > commons-logging-1.0.4.jar > commons-validator-1.2.0.jar > jenia4faces-commons_1.2.jar > jenia4faces-popup_1.2.jar > jstl-1.1.0.jar > myfaces-api-1.1.5.jar > myfaces-impl-1.1.5.jar > > ojdbc14.jar > oro-2.0.8.jar > oscache-2.3.2.jar > portlet-api.jar > struts.jar > tomahawk-1.1.3.jar > > -------------- > web.xml > -------------- > > <?xml version="1.0"?> > <!-- > * Copyright 2004 The Apache Software Foundation. > > * > * Licensed under the Apache License, Version 2.0 (the "License"); > * you may not use this file except in compliance with the License. > * You may obtain a copy of the License at > * > * http://www.apache.org/licenses/LICENSE-2.0 > * > * Unless required by applicable law or agreed to in writing, software > * distributed under the License is distributed on an "AS IS" BASIS, > > * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or > implied. > * See the License for the specific language governing permissions and > * limitations under the License. > * > * UPDATED: Marty Hall changed to use .faces suffix, > > * faces-config.xml filename, and servlets 2.4. > * See tutorial at http://www.coreservlets.com/JSF-Tutorial/. > * Note: uncomment the filter entries at the bottom > > * to use Tomahawk extended components. > --> > > <web-app xmlns="http://java.sun.com/xml/ns/j2ee" > xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance > <http://www.w3.org/2001/XMLSchema-instance> " > xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee > http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" > version="2.4"> > > <context-param> > <param-name>javax.faces.CONFIG_FILES</param-name> > <param-value> > > /WEB-INF/faces-config.xml > </param-value> > > </context-param> > > > <context-param> > <param-name>javax.faces.STATE_SAVING_METHOD</param-name> > > <param-value>client</param-value> > > > </context-param> > > <context-param> > <param-name>org.apache.myfaces.ALLOW_JAVASCRIPT</param-name> > <param-value>true</param-value> > > > > </context-param> > > <context-param> > <param-name>org.apache.myfaces.PRETTY_HTML</param-name> > <param-value>true</param-value> > > > </context-param> > > > <context-param> > <param-name>org.apache.myfaces.DETECT_JAVASCRIPT</param-name> > <param-value>false</param-value> > </context-param> > > <context-param> > > <param-name>org.apache.myfaces.AUTO_SCROLL</param-name> > <param-value>true</param-value> > > </context-param> > > <!-- Listener, that does all the startup work (configuration, init). > --> > > <listener> > > <listener-class>org.apache.myfaces.webapp.StartupServletContextListener< > /listener-class> > </listener> > > <!-- Faces Servlet > Marty Hall: changed .jsf back to standard of .faces --> > > <servlet> > <servlet-name>Faces Servlet</servlet-name> > <servlet-class>javax.faces.webapp.FacesServlet</servlet-class> > <load-on-startup>1</load-on-startup> > > </servlet> > > <servlet> > <servlet-name>Jenia internal servlet</servlet-name> > <servlet-class>org.jenia.faces.util.Servlet</servlet-class> > <load-on-startup>2</load-on-startup> > > </servlet> > <servlet-mapping> > <servlet-name>Faces Servlet</servlet-name> > <url-pattern>*.faces</url-pattern> > </servlet-mapping> > <servlet-mapping> > > <servlet-name>Jenia internal servlet</servlet-name> > <url-pattern>/jenia4faces/*</url-pattern> > </servlet-mapping> > > <!-- Welcome files --> > <welcome-file-list> > > <welcome-file>index.jsp</welcome-file> > </welcome-file-list> > > > <filter> > <filter-name>MyFacesExtensionsFilter</filter-name> > > <filter-class> > org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class> > <init-param> > <param-name>maxFileSize</param-name> > <param-value>20m</param-value> > > </init-param> > > </filter> > > > <filter> > <display-name>Ajax4jsf Filter</display-name> > <filter-name>ajax4jsf</filter-name> > <filter-class>org.ajax4jsf.Filter</filter-class> > </filter> > <filter-mapping> > <filter-name>ajax4jsf</filter-name> > <servlet-name>Faces Servlet</servlet-name> > <dispatcher>REQUEST</dispatcher> > <dispatcher>FORWARD</dispatcher> > > <dispatcher>INCLUDE</dispatcher> > </filter-mapping> > > > <!-- extension mapping for adding <script/>, <link/>, and other resource > tags to JSF-pages --> > <filter-mapping> > > <filter-name>MyFacesExtensionsFilter</filter-name> > <url-pattern>*.faces</url-pattern> > </filter-mapping> > > <!-- extension mapping for serving page-independent resources > (javascript, > > stylesheets, images, etc.) --> > <filter-mapping> > <filter-name>MyFacesExtensionsFilter</filter-name> > <url-pattern>/faces/myFacesExtensionResource/*</url-pattern> > </filter-mapping> > > > > </web-app> > > -- > View this message in context: > http://www.nabble.com/date-in-jenia-calendar-is-off-by-one-tf3352598.htm > l#a9323327 > > Sent from the MyFaces - Users mailing list archive at Nabble.com. > > > > > > > **************** CAUTION - Disclaimer ***************** > This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended > solely for the use of the addressee(s). If you are not the intended > recipient, please notify the sender by e-mail and delete the original > message. Further, you are not to copy, disclose, or distribute this e-mail > or its contents to any other person and any such actions are unlawful. > This e-mail may contain viruses. Infosys has taken every reasonable > precaution to minimize this risk, but is not liable for any damage you may > sustain as a result of any virus in this e-mail. You should carry out your > own virus checks before opening the e-mail or attachment. Infosys reserves > the right to monitor and review the content of all messages sent to or > from this e-mail address. Messages sent to or from this e-mail address may > be stored on the Infosys e-mail system. > ***INFOSYS******** End of Disclaimer ********INFOSYS*** > -- View this message in context: http://www.nabble.com/date-in-jenia-calendar-is-off-by-one-tf3352598.html#a9332198 Sent from the MyFaces - Users mailing list archive at Nabble.com.

