[jboss-user] [JBoss Seam] - Re: Problem with decrementing dates

msteiner do-not-reply at jboss.com
Tue Oct 10 07:09:17 EDT 2006


This is my solution: 
Component:


  | 
  | @Name("defaultTimeZone")
  | @Scope(ScopeType.APPLICATION)
  | @Intercept(NEVER)
  | public class DefaultTimeZone {
  |     /**
  |      * @return default TimeZone
  |      */
  |     @Unwrap
  |     public TimeZone getDefaultTimeZone() {
  |         return TimeZone.getDefault();
  |     }
  | }
  | 


Page:


  | <h:outputText value="#{myObj.date}">
  | <f:convertDateTime pattern="yyyy-MM-dd HH:mm:ss" timeZone="#{defaultTimeZone}" />
  | </h:outputText>

It is easy to change for example to userTimeZone where timeZone is extracted from database or something like this


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3977198#3977198

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3977198



More information about the jboss-user mailing list