My production server stays in a different timezone, however, the time difference is only two hours.
The problem is that events on my local development machine appear in the correct day in the schedule component. If I access the schedule component on the production server all events are one day earlier displayed.
Can't get way?
Schedule and Timezone problem
JSF-2.0, mojarra-2.1 | PrimeFaces-3.0-M1 | GFv3.1 | NetBeans 7 | Ubuntu 11.04
www.yukonlive.ca
www.yukonlive.de
www.yukonlive.ca
www.yukonlive.de
if it's fine for your web application to follow the Web Server's system TimeZone where it deployed, add the following code to your Deployment Descriptor web.xml:
Code: Select all
<context-param>
<param-name>javax.faces.DATETIMECONVERTER_DEFAULT_TIMEZONE_IS_SYSTEM_TIMEZONE</param-name>
<param-value>true</param-value>
</context-param>
PrimeFaces 3.0M1, Sun Mojarra 2.0.4 FCS, Sun GlassFish JSTL 1.2,
Apache Log4J 1.2.16, EclipseLink 2.1.1.v20100817-r8050,
Eclipse Helios
Apache Log4J 1.2.16, EclipseLink 2.1.1.v20100817-r8050,
Eclipse Helios
Thanks for your quick response.
Actually, I need to have my local timezone as the default, can I set this via <context-param> too?
Stephan
Actually, I need to have my local timezone as the default, can I set this via <context-param> too?
Stephan
JSF-2.0, mojarra-2.1 | PrimeFaces-3.0-M1 | GFv3.1 | NetBeans 7 | Ubuntu 11.04
www.yukonlive.ca
www.yukonlive.de
www.yukonlive.ca
www.yukonlive.de
yes, as long as you can access it at your Bean, for example
web.xml:
map calendar component's timezone attribute to a bean's value, like this:
myGlobalBean:
web.xml:
Code: Select all
<context-param>
<param-name>FIXED_LOCAL_TIMEZONE</param-name>
<param-value>GMT+08:00</param-value>
</context-param>
Code: Select all
timezone="#{myGlobalBean.localTimeZone}"
Code: Select all
public String getLocalTimeZone()
{
return FacesContext.getCurrentInstance().getExternalContext().getInitParameter( "FIXED_LOCAL_TIMEZONE" );
}
PrimeFaces 3.0M1, Sun Mojarra 2.0.4 FCS, Sun GlassFish JSTL 1.2,
Apache Log4J 1.2.16, EclipseLink 2.1.1.v20100817-r8050,
Eclipse Helios
Apache Log4J 1.2.16, EclipseLink 2.1.1.v20100817-r8050,
Eclipse Helios
Thanks will try this later the day.
However, we have spoken about schedule and schedule doesn't has a timezone property.
However, we have spoken about schedule and schedule doesn't has a timezone property.
JSF-2.0, mojarra-2.1 | PrimeFaces-3.0-M1 | GFv3.1 | NetBeans 7 | Ubuntu 11.04
www.yukonlive.ca
www.yukonlive.de
www.yukonlive.ca
www.yukonlive.de
I contribute this misbehavior to a bug in <p:schedule> component, which for I just created an issue.
http://code.google.com/p/primefaces/iss ... il?id=1540
This bug can also be reproduced in PF Showcase.
http://code.google.com/p/primefaces/iss ... il?id=1540
This bug can also be reproduced in PF Showcase.
JSF-2.0, mojarra-2.1 | PrimeFaces-3.0-M1 | GFv3.1 | NetBeans 7 | Ubuntu 11.04
www.yukonlive.ca
www.yukonlive.de
www.yukonlive.ca
www.yukonlive.de
-
- Information
-
Who is online
Users browsing this forum: No registered users and 32 guests