Re: svn commit: r804104 - in /ofbiz/trunk/framework: base/src/org/ofbiz/base/util/template/ entity/src/org/ofbiz/entity/jdbc/ widget/src/org/ofbiz/widget/form/

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r804104 - in /ofbiz/trunk/framework: base/src/org/ofbiz/base/util/template/ entity/src/org/ofbiz/entity/jdbc/ widget/src/org/ofbiz/widget/form/

Adrian Crum-2
Hans,

This commit disables the user-selected time zone. Please re-think what you're doing.

-Adrian

--- On Fri, 8/14/09, [hidden email] <[hidden email]> wrote:

> From: [hidden email] <[hidden email]>
> Subject: svn commit: r804104 - in /ofbiz/trunk/framework: base/src/org/ofbiz/base/util/template/ entity/src/org/ofbiz/entity/jdbc/ widget/src/org/ofbiz/widget/form/
> To: [hidden email]
> Date: Friday, August 14, 2009, 12:42 AM
> Author: hansbak
> Date: Fri Aug 14 07:42:30 2009
> New Revision: 804104
>
> URL: http://svn.apache.org/viewvc?rev=804104&view=rev
> Log:
> adjustment of storing/retrieving timestamp in the proper
> timezone. In the database the time zone is always GMT
>
> Modified:
>    
> ofbiz/trunk/framework/base/src/org/ofbiz/base/util/template/FreeMarkerWorker.java
>    
> ofbiz/trunk/framework/entity/src/org/ofbiz/entity/jdbc/SQLProcessor.java
>    
> ofbiz/trunk/framework/entity/src/org/ofbiz/entity/jdbc/SqlJdbcUtil.java
>    
> ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelFormField.java
>
> Modified:
> ofbiz/trunk/framework/base/src/org/ofbiz/base/util/template/FreeMarkerWorker.java
> URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/util/template/FreeMarkerWorker.java?rev=804104&r1=804103&r2=804104&view=diff
> ==============================================================================
> ---
> ofbiz/trunk/framework/base/src/org/ofbiz/base/util/template/FreeMarkerWorker.java
> (original)
> +++
> ofbiz/trunk/framework/base/src/org/ofbiz/base/util/template/FreeMarkerWorker.java
> Fri Aug 14 07:42:30 2009
> @@ -78,7 +78,7 @@
>  
>      public static Configuration
> makeConfiguration(BeansWrapper wrapper) {
>          Configuration
> newConfig = new Configuration();
> -
> +       
>      
>    newConfig.setObjectWrapper(wrapper);
>      
>    newConfig.setSharedVariable("Static",
> wrapper.getStaticModels());
>      
>    newConfig.setLocalizedLookup(false);
> @@ -218,11 +218,11 @@
>          }
>      
>    env.setLocale(locale);
>  
> -        TimeZone timeZone = (TimeZone)
> context.get("timeZone");
> -        if (timeZone == null) {
> -            timeZone =
> TimeZone.getDefault();
> -        }
> -        env.setTimeZone(timeZone);
> +//        TimeZone timeZone =
> (TimeZone) context.get("timeZone");
> +//        if (timeZone == null) {
> +//            timeZone =
> TimeZone.getDefault();
> +//        }
> +//        env.setTimeZone(timeZone);
>      }
>  
>      public static Configuration
> getDefaultOfbizConfig() {
>
> Modified:
> ofbiz/trunk/framework/entity/src/org/ofbiz/entity/jdbc/SQLProcessor.java
> URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/jdbc/SQLProcessor.java?rev=804104&r1=804103&r2=804104&view=diff
> ==============================================================================
> ---
> ofbiz/trunk/framework/entity/src/org/ofbiz/entity/jdbc/SQLProcessor.java
> (original)
> +++
> ofbiz/trunk/framework/entity/src/org/ofbiz/entity/jdbc/SQLProcessor.java
> Fri Aug 14 07:42:30 2009
> @@ -27,10 +27,15 @@
>  import java.util.ArrayList;
>  import java.util.List;
>  import java.util.Map;
> +import java.util.TimeZone;
>  
>  import org.ofbiz.base.util.Debug;
> +import org.ofbiz.base.util.UtilMisc;
> +import org.ofbiz.base.util.UtilValidate;
>  import org.ofbiz.entity.GenericDataSourceException;
> +import org.ofbiz.entity.GenericDelegator;
>  import org.ofbiz.entity.GenericEntityException;
> +import org.ofbiz.entity.GenericValue;
>  import org.ofbiz.entity.config.DatasourceInfo;
>  import org.ofbiz.entity.config.EntityConfigUtil;
>  import
> org.ofbiz.entity.transaction.GenericTransactionException;
> @@ -578,6 +583,27 @@
>       */
>      public void
> setValue(java.sql.Timestamp field) throws SQLException {
>          if (field != null)
> {
> +           
> GenericDelegator
> delegator=GenericDelegator.getGenericDelegator("default");
> +            String
> userId=delegator.getCurrentUserIdentifier();
> +            try {
> +           
>     if(userId!=null){
> +           
>         String
> timeZoneId=TimeZone.getDefault().getID();
> +           
>         GenericValue
> userLogin=delegator.findByPrimaryKey("UserLogin",
> UtilMisc.toMap("userLoginId", userId));
> +           
>         if(userLogin!=null){
> +           
>            
> if(UtilValidate.isNotEmpty(userLogin.get("lastTimeZone"))){
> +           
>            
>    
> timeZoneId=userLogin.getString("lastTimeZone");   
>
> +           
>            
>    
> SqlJdbcUtil.setLastTimeZoneId(timeZoneId);
> +           
>             }
> +           
>         }   
>    
> +           
>             if
> (field instanceof java.sql.Timestamp) {
> +           
>            
>     String
> dateField=SqlJdbcUtil.convertTimeZone(field.toString(),timeZoneId,
> "GMT");
> +           
>            
>     field=
> java.sql.Timestamp.valueOf(dateField);
> +           
>             }
> +           
>     }
> +            }
> catch (GenericEntityException e) {
> +           
>     // TODO Auto-generated catch block
> +           
>     e.printStackTrace();
> +            }
>
>          
>    _ps.setTimestamp(_ind, field);
>          } else {
>          
>    _ps.setNull(_ind, Types.TIMESTAMP);
>
> Modified:
> ofbiz/trunk/framework/entity/src/org/ofbiz/entity/jdbc/SqlJdbcUtil.java
> URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/jdbc/SqlJdbcUtil.java?rev=804104&r1=804103&r2=804104&view=diff
> ==============================================================================
> ---
> ofbiz/trunk/framework/entity/src/org/ofbiz/entity/jdbc/SqlJdbcUtil.java
> (original)
> +++
> ofbiz/trunk/framework/entity/src/org/ofbiz/entity/jdbc/SqlJdbcUtil.java
> Fri Aug 14 07:42:30 2009
> @@ -30,11 +30,15 @@
>  import java.sql.ResultSetMetaData;
>  import java.sql.SQLException;
>  import java.sql.Clob;
> +import java.text.ParseException;
> +import java.text.SimpleDateFormat;
>  import java.util.Collection;
> +import java.util.Date;
>  import java.util.Iterator;
>  import java.util.List;
>  import java.util.Map;
>  import java.util.Set;
> +import java.util.TimeZone;
>  import java.util.TreeSet;
>  
>  import javax.sql.rowset.serial.SerialBlob;
> @@ -44,6 +48,7 @@
>  
>  import org.ofbiz.base.util.Debug;
>  import org.ofbiz.base.util.ObjectType;
> +import org.ofbiz.base.util.UtilDateTime;
>  import org.ofbiz.base.util.UtilGenerics;
>  import org.ofbiz.base.util.UtilValidate;
>  import org.ofbiz.entity.GenericDataSourceException;
> @@ -486,7 +491,35 @@
>              }
>          }
>      }
> -
> +   
> +    public static String
> lastTimeZoneId=TimeZone.getDefault().getID();
> +    public static void setLastTimeZoneId(String
> timeZoneId){
> +       
> lastTimeZoneId=timeZoneId;
> +    }
> +    public static String getLastTimeZoneId(){
> +        return lastTimeZoneId;
> +    }
> +    public static String convertTimeZone(String
> time, String sourceTZ, String destTZ){
> +        SimpleDateFormat sdf
> = new SimpleDateFormat(UtilDateTime.DATE_TIME_FORMAT);
> +        Date
> specifiedTime=null;
> +        try {
> +           
> if (sourceTZ != null)
> +           
>    
> sdf.setTimeZone(TimeZone.getTimeZone(sourceTZ));
> +           
> else
> +           
>     sdf.setTimeZone(TimeZone.getDefault());
> +           
> specifiedTime = sdf.parse(time);
> +       
> +           
> if (destTZ != null)
> +           
>    
> sdf.setTimeZone(TimeZone.getTimeZone(destTZ));
> +           
> else
> +           
>     sdf.setTimeZone(TimeZone.getDefault());
> +        } catch
> (ParseException e) {
> +           
> // TODO Auto-generated catch block
> +           
> Debug.logError("Error Convert time zone: "+e.getMessage(),
> module);
> +        }
> +        return
> sdf.format(specifiedTime);
> +    }
> +   
>      public static void
> getValue(ResultSet rs, int ind, ModelField curField,
> GenericEntity entity, ModelFieldTypeReader
> modelFieldTypeReader) throws GenericEntityException {
>          ModelFieldType mft =
> modelFieldTypeReader.getModelFieldType(curField.getType());
>  
> @@ -539,7 +572,12 @@
>                
>      break;
>  
>              
>    case 2:
> -               
>     entity.dangerousSetNoCheckButFast(curField,
> rs.getTimestamp(ind));
> +               
>     Object value=rs.getTimestamp(ind);
> +               
>     if (value!=null&&value instanceof
> java.sql.Timestamp) {
> +               
>         String
> dateField=convertTimeZone(value.toString(),"GMT",lastTimeZoneId);
> +               
>         value=
> java.sql.Timestamp.valueOf(dateField);
> +               
>     }
> +               
>    
> entity.dangerousSetNoCheckButFast(curField,value);
>                
>      break;
>  
>              
>    case 3:
>
> Modified:
> ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelFormField.java
> URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelFormField.java?rev=804104&r1=804103&r2=804104&view=diff
> ==============================================================================
> ---
> ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelFormField.java
> (original)
> +++
> ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelFormField.java
> Fri Aug 14 07:42:30 2009
> @@ -22,6 +22,7 @@
>  import java.math.BigDecimal;
>  import java.text.DateFormat;
>  import java.text.NumberFormat;
> +import java.text.SimpleDateFormat;
>  import java.util.HashMap;
>  import java.util.LinkedList;
>  import java.util.List;
> @@ -675,7 +676,8 @@
>          if (locale == null)
> locale = Locale.getDefault();
>          TimeZone timeZone =
> (TimeZone) context.get("timeZone");
>          if (timeZone ==
> null) timeZone = TimeZone.getDefault();
> -
> +       
> +        SimpleDateFormat sdf=new
> SimpleDateFormat(UtilDateTime.DATE_TIME_FORMAT);
>          String returnValue;
>  
>          // if
> useRequestParameters is TRUE then parameters will always be
> used, if FALSE then parameters will never be used
> @@ -736,27 +738,32 @@
>              
>    }
>              }
>  
> -            if (retVal !=
> null) {
> -                //
> format string based on the user's locale and time zone
> -                if
> (retVal instanceof Double || retVal instanceof Float ||
> retVal instanceof BigDecimal) {
> -               
>     NumberFormat nf =
> NumberFormat.getInstance(locale);
> -               
>     nf.setMaximumFractionDigits(10);
> -               
>     returnValue = nf.format(retVal);
> -                }
> else if (retVal instanceof java.sql.Date) {
> -               
>     DateFormat df =
> UtilDateTime.toDateFormat(UtilDateTime.DATE_FORMAT,
> timeZone, null);
> -               
>     returnValue = df.format((java.util.Date)
> retVal);
> -                }
> else if (retVal instanceof java.sql.Time) {
> -               
>     DateFormat df =
> UtilDateTime.toTimeFormat(UtilDateTime.TIME_FORMAT,
> timeZone, null);
> -               
>     returnValue = df.format((java.util.Date)
> retVal);
> -                }
> else if (retVal instanceof java.sql.Timestamp) {
> -               
>     DateFormat df =
> UtilDateTime.toDateTimeFormat(UtilDateTime.DATE_TIME_FORMAT,
> timeZone, null);
> -               
>     returnValue = df.format((java.util.Date)
> retVal);
> -                }
> else if (retVal instanceof java.util.Date) {
> -               
>     DateFormat df =
> UtilDateTime.toDateTimeFormat("EEE MMM dd hh:mm:ss z yyyy",
> timeZone, null);
> -               
>     returnValue = df.format((java.util.Date)
> retVal);
> -                }
> else {
> -               
>     returnValue = retVal.toString();
> -                }
> +            if (retVal !=
> null) {
> +           
>     // format string based on the user's
> locale and time zone
> +           
>     if (retVal instanceof Double || retVal
> instanceof Float || retVal instanceof BigDecimal) {
> +           
>         NumberFormat nf =
> NumberFormat.getInstance(locale);
> +           
>        
> nf.setMaximumFractionDigits(10);
> +           
>         returnValue =
> nf.format(retVal);
> +           
>     } else if (retVal instanceof
> java.sql.Date) {
> +//             
>     DateFormat df =
> UtilDateTime.toDateFormat(UtilDateTime.DATE_FORMAT,
> timeZone, null);
> +//             
>     returnValue = df.format((java.util.Date)
> retVal);
> +           
>        
> returnValue=sdf.format((java.util.Date)retVal);
> +           
>     } else if (retVal instanceof
> java.sql.Time) {
> +//             
>     DateFormat df =
> UtilDateTime.toTimeFormat(UtilDateTime.TIME_FORMAT,
> timeZone, null);
> +//             
>     returnValue = df.format((java.util.Date)
> retVal);
> +           
>        
> returnValue=sdf.format((java.util.Date)retVal);
> +           
>     } else if (retVal instanceof
> java.sql.Timestamp) {
> +//             
>     DateFormat df =
> UtilDateTime.toTimeFormat(UtilDateTime.TIME_FORMAT,
> timeZone, null);
> +//             
>     returnValue = df.format((java.util.Date)
> retVal);
> +           
>        
> returnValue=sdf.format((java.util.Date)retVal);
> +           
>     } else if (retVal instanceof
> java.util.Date) {
> +//             
>     DateFormat df =
> UtilDateTime.toDateTimeFormat("EEE MMM dd hh:mm:ss z yyyy",
> timeZone, null);
> +//             
>     returnValue = df.format((java.util.Date)
> retVal);
> +           
>         SimpleDateFormat
> sdfz=new SimpleDateFormat("EEE MMM dd hh:mm:ss z yyyy");
> +           
>        
> returnValue=sdfz.format((java.util.Date)retVal);
> +           
>     } else {
> +           
>         returnValue =
> retVal.toString();
> +           
>     }
>              
>    return returnValue; // do not encode date
> and number type fields
>              } else
> {
>              
>    returnValue = defaultValue;
>
>
>



Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r804104 - in /ofbiz/trunk/framework: base/src/org/ofbiz/base/util/template/ entity/src/org/ofbiz/entity/jdbc/ widget/src/org/ofbiz/widget/form/

hans_bakker
I already took it out for other reasons.

Currently we have the problem that when an event is entered on the
calendar with a default timezone of indochina time the entered time
changes with 6 hours after it is saved.

the patch solved the problem, but now with he delegator interface it did
not compile anymore....

if you have a solutions, let me know....

Regards,
Hans

On Fri, 2009-08-14 at 06:20 -0700, Adrian Crum wrote:
> Hans,
>
> This commit disables the user-selected time zone. Please re-think what you're doing.
>
> -Adrian

Antwebsystems.com: Quality OFBiz services for competitive rates

Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r804104 - in /ofbiz/trunk/framework: base/src/org/ofbiz/base/util/template/ entity/src/org/ofbiz/entity/jdbc/ widget/src/org/ofbiz/widget/form/

Adrian Crum-2
Where is the event being entered? Follow the program flow to make sure the user's timezone is being used each step of the way. If the default time zone is used anywhere along the execution path, then you'll get odd results.

-Adrian

--- On Fri, 8/14/09, Hans Bakker <[hidden email]> wrote:

> From: Hans Bakker <[hidden email]>
> Subject: Re: svn commit: r804104 - in /ofbiz/trunk/framework: base/src/org/ofbiz/base/util/template/ entity/src/org/ofbiz/entity/jdbc/ widget/src/org/ofbiz/widget/form/
> To: [hidden email]
> Date: Friday, August 14, 2009, 4:01 PM
> I already took it out for other
> reasons.
>
> Currently we have the problem that when an event is entered
> on the
> calendar with a default timezone of indochina time the
> entered time
> changes with 6 hours after it is saved.
>
> the patch solved the problem, but now with he delegator
> interface it did
> not compile anymore....
>
> if you have a solutions, let me know....
>
> Regards,
> Hans
>
> On Fri, 2009-08-14 at 06:20 -0700, Adrian Crum wrote:
> > Hans,
> >
> > This commit disables the user-selected time zone.
> Please re-think what you're doing.
> >
> > -Adrian
>
> Antwebsystems.com: Quality OFBiz services for competitive
> rates
>
>


     
Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r804104 - in /ofbiz/trunk/framework: base/src/org/ofbiz/base/util/template/ entity/src/org/ofbiz/entity/jdbc/ widget/src/org/ofbiz/widget/form/

hans_bakker
Hi Adrian,

that is what we did. You can try yourself: go to myportal and add an
event on the calendar with a certain time....after saving, it the time
has changed.

Regards,
Hans

On Fri, 2009-08-14 at 18:08 -0700, Adrian Crum wrote:

> Where is the event being entered? Follow the program flow to make sure the user's timezone is being used each step of the way. If the default time zone is used anywhere along the execution path, then you'll get odd results.
>
> -Adrian
>
> --- On Fri, 8/14/09, Hans Bakker <[hidden email]> wrote:
>
> > From: Hans Bakker <[hidden email]>
> > Subject: Re: svn commit: r804104 - in /ofbiz/trunk/framework: base/src/org/ofbiz/base/util/template/ entity/src/org/ofbiz/entity/jdbc/ widget/src/org/ofbiz/widget/form/
> > To: [hidden email]
> > Date: Friday, August 14, 2009, 4:01 PM
> > I already took it out for other
> > reasons.
> >
> > Currently we have the problem that when an event is entered
> > on the
> > calendar with a default timezone of indochina time the
> > entered time
> > changes with 6 hours after it is saved.
> >
> > the patch solved the problem, but now with he delegator
> > interface it did
> > not compile anymore....
> >
> > if you have a solutions, let me know....
> >
> > Regards,
> > Hans
> >
> > On Fri, 2009-08-14 at 06:20 -0700, Adrian Crum wrote:
> > > Hans,
> > >
> > > This commit disables the user-selected time zone.
> > Please re-think what you're doing.
> > >
> > > -Adrian
> >
> > Antwebsystems.com: Quality OFBiz services for competitive
> > rates
> >
> >
>
>
>      
--
Antwebsystems.com: Quality OFBiz services for competitive rates

Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r804104 - in /ofbiz/trunk/framework: base/src/org/ofbiz/base/util/template/ entity/src/org/ofbiz/entity/jdbc/ widget/src/org/ofbiz/widget/form/

Adrian Crum-2
I can see the problem.

Well, if you look at the Edit Work Effort screen, the time is displayed correctly. If you look at the current time in the page footer, that is displayed correctly too. So, the problem isn't in the framework, and it isn't in Freemarker. It's probably somewhere in the logic that gathers the calender entries.

-Adrian

--- On Fri, 8/14/09, Hans Bakker <[hidden email]> wrote:

> From: Hans Bakker <[hidden email]>
> Subject: Re: svn commit: r804104 - in /ofbiz/trunk/framework: base/src/org/ofbiz/base/util/template/ entity/src/org/ofbiz/entity/jdbc/ widget/src/org/ofbiz/widget/form/
> To: [hidden email]
> Date: Friday, August 14, 2009, 6:38 PM
> Hi Adrian,
>
> that is what we did. You can try yourself: go to myportal
> and add an
> event on the calendar with a certain time....after saving,
> it the time
> has changed.
>
> Regards,
> Hans
>
> On Fri, 2009-08-14 at 18:08 -0700, Adrian Crum wrote:
> > Where is the event being entered? Follow the program
> flow to make sure the user's timezone is being used each
> step of the way. If the default time zone is used anywhere
> along the execution path, then you'll get odd results.
> >
> > -Adrian
> >
> > --- On Fri, 8/14/09, Hans Bakker <[hidden email]>
> wrote:
> >
> > > From: Hans Bakker <[hidden email]>
> > > Subject: Re: svn commit: r804104 - in
> /ofbiz/trunk/framework:
> base/src/org/ofbiz/base/util/template/
> entity/src/org/ofbiz/entity/jdbc/
> widget/src/org/ofbiz/widget/form/
> > > To: [hidden email]
> > > Date: Friday, August 14, 2009, 4:01 PM
> > > I already took it out for other
> > > reasons.
> > >
> > > Currently we have the problem that when an event
> is entered
> > > on the
> > > calendar with a default timezone of indochina
> time the
> > > entered time
> > > changes with 6 hours after it is saved.
> > >
> > > the patch solved the problem, but now with he
> delegator
> > > interface it did
> > > not compile anymore....
> > >
> > > if you have a solutions, let me know....
> > >
> > > Regards,
> > > Hans
> > >
> > > On Fri, 2009-08-14 at 06:20 -0700, Adrian Crum
> wrote:
> > > > Hans,
> > > >
> > > > This commit disables the user-selected time
> zone.
> > > Please re-think what you're doing.
> > > >
> > > > -Adrian
> > >
> > > Antwebsystems.com: Quality OFBiz services for
> competitive
> > > rates
> > >
> > >
> >
> >
> >       
> --
> Antwebsystems.com: Quality OFBiz services for competitive
> rates
>
>



Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r804104 - in /ofbiz/trunk/framework: base/src/org/ofbiz/base/util/template/ entity/src/org/ofbiz/entity/jdbc/ widget/src/org/ofbiz/widget/form/

Adrian Crum-2
In addition, the problem doesn't exist in R 9.04.

--- On Sat, 8/15/09, Adrian Crum <[hidden email]> wrote:

> From: Adrian Crum <[hidden email]>
> Subject: Re: svn commit: r804104 - in /ofbiz/trunk/framework: base/src/org/ofbiz/base/util/template/ entity/src/org/ofbiz/entity/jdbc/ widget/src/org/ofbiz/widget/form/
> To: [hidden email]
> Date: Saturday, August 15, 2009, 10:05 AM
> I can see the problem.
>
> Well, if you look at the Edit Work Effort screen, the time
> is displayed correctly. If you look at the current time in
> the page footer, that is displayed correctly too. So, the
> problem isn't in the framework, and it isn't in Freemarker.
> It's probably somewhere in the logic that gathers the
> calender entries.
>
> -Adrian
>
> --- On Fri, 8/14/09, Hans Bakker <[hidden email]>
> wrote:
>
> > From: Hans Bakker <[hidden email]>
> > Subject: Re: svn commit: r804104 - in
> /ofbiz/trunk/framework:
> base/src/org/ofbiz/base/util/template/
> entity/src/org/ofbiz/entity/jdbc/
> widget/src/org/ofbiz/widget/form/
> > To: [hidden email]
> > Date: Friday, August 14, 2009, 6:38 PM
> > Hi Adrian,
> >
> > that is what we did. You can try yourself: go to
> myportal
> > and add an
> > event on the calendar with a certain time....after
> saving,
> > it the time
> > has changed.
> >
> > Regards,
> > Hans
> >
> > On Fri, 2009-08-14 at 18:08 -0700, Adrian Crum wrote:
> > > Where is the event being entered? Follow the
> program
> > flow to make sure the user's timezone is being used
> each
> > step of the way. If the default time zone is used
> anywhere
> > along the execution path, then you'll get odd
> results.
> > >
> > > -Adrian
> > >
> > > --- On Fri, 8/14/09, Hans Bakker <[hidden email]>
> > wrote:
> > >
> > > > From: Hans Bakker <[hidden email]>
> > > > Subject: Re: svn commit: r804104 - in
> > /ofbiz/trunk/framework:
> > base/src/org/ofbiz/base/util/template/
> > entity/src/org/ofbiz/entity/jdbc/
> > widget/src/org/ofbiz/widget/form/
> > > > To: [hidden email]
> > > > Date: Friday, August 14, 2009, 4:01 PM
> > > > I already took it out for other
> > > > reasons.
> > > >
> > > > Currently we have the problem that when an
> event
> > is entered
> > > > on the
> > > > calendar with a default timezone of
> indochina
> > time the
> > > > entered time
> > > > changes with 6 hours after it is saved.
> > > >
> > > > the patch solved the problem, but now with
> he
> > delegator
> > > > interface it did
> > > > not compile anymore....
> > > >
> > > > if you have a solutions, let me know....
> > > >
> > > > Regards,
> > > > Hans
> > > >
> > > > On Fri, 2009-08-14 at 06:20 -0700, Adrian
> Crum
> > wrote:
> > > > > Hans,
> > > > >
> > > > > This commit disables the user-selected
> time
> > zone.
> > > > Please re-think what you're doing.
> > > > >
> > > > > -Adrian
> > > >
> > > > Antwebsystems.com: Quality OFBiz services
> for
> > competitive
> > > > rates
> > > >
> > > >
> > >
> > >
> > >       
> > --
> > Antwebsystems.com: Quality OFBiz services for
> competitive
> > rates
> >
> >
>
>
>
>



Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r804104 - in /ofbiz/trunk/framework: base/src/org/ofbiz/base/util/template/ entity/src/org/ofbiz/entity/jdbc/ widget/src/org/ofbiz/widget/form/

hans_bakker
Could it be that the form widget is now using ftl macros and that the
time is adjusted 2 times: by the framework and by freemarker?

On Sun, 2009-08-16 at 12:27 -0700, Adrian Crum wrote:

> In addition, the problem doesn't exist in R 9.04.
>
> --- On Sat, 8/15/09, Adrian Crum <[hidden email]> wrote:
>
> > From: Adrian Crum <[hidden email]>
> > Subject: Re: svn commit: r804104 - in /ofbiz/trunk/framework: base/src/org/ofbiz/base/util/template/ entity/src/org/ofbiz/entity/jdbc/ widget/src/org/ofbiz/widget/form/
> > To: [hidden email]
> > Date: Saturday, August 15, 2009, 10:05 AM
> > I can see the problem.
> >
> > Well, if you look at the Edit Work Effort screen, the time
> > is displayed correctly. If you look at the current time in
> > the page footer, that is displayed correctly too. So, the
> > problem isn't in the framework, and it isn't in Freemarker.
> > It's probably somewhere in the logic that gathers the
> > calender entries.
> >
> > -Adrian
> >
> > --- On Fri, 8/14/09, Hans Bakker <[hidden email]>
> > wrote:
> >
> > > From: Hans Bakker <[hidden email]>
> > > Subject: Re: svn commit: r804104 - in
> > /ofbiz/trunk/framework:
> > base/src/org/ofbiz/base/util/template/
> > entity/src/org/ofbiz/entity/jdbc/
> > widget/src/org/ofbiz/widget/form/
> > > To: [hidden email]
> > > Date: Friday, August 14, 2009, 6:38 PM
> > > Hi Adrian,
> > >
> > > that is what we did. You can try yourself: go to
> > myportal
> > > and add an
> > > event on the calendar with a certain time....after
> > saving,
> > > it the time
> > > has changed.
> > >
> > > Regards,
> > > Hans
> > >
> > > On Fri, 2009-08-14 at 18:08 -0700, Adrian Crum wrote:
> > > > Where is the event being entered? Follow the
> > program
> > > flow to make sure the user's timezone is being used
> > each
> > > step of the way. If the default time zone is used
> > anywhere
> > > along the execution path, then you'll get odd
> > results.
> > > >
> > > > -Adrian
> > > >
> > > > --- On Fri, 8/14/09, Hans Bakker <[hidden email]>
> > > wrote:
> > > >
> > > > > From: Hans Bakker <[hidden email]>
> > > > > Subject: Re: svn commit: r804104 - in
> > > /ofbiz/trunk/framework:
> > > base/src/org/ofbiz/base/util/template/
> > > entity/src/org/ofbiz/entity/jdbc/
> > > widget/src/org/ofbiz/widget/form/
> > > > > To: [hidden email]
> > > > > Date: Friday, August 14, 2009, 4:01 PM
> > > > > I already took it out for other
> > > > > reasons.
> > > > >
> > > > > Currently we have the problem that when an
> > event
> > > is entered
> > > > > on the
> > > > > calendar with a default timezone of
> > indochina
> > > time the
> > > > > entered time
> > > > > changes with 6 hours after it is saved.
> > > > >
> > > > > the patch solved the problem, but now with
> > he
> > > delegator
> > > > > interface it did
> > > > > not compile anymore....
> > > > >
> > > > > if you have a solutions, let me know....
> > > > >
> > > > > Regards,
> > > > > Hans
> > > > >
> > > > > On Fri, 2009-08-14 at 06:20 -0700, Adrian
> > Crum
> > > wrote:
> > > > > > Hans,
> > > > > >
> > > > > > This commit disables the user-selected
> > time
> > > zone.
> > > > > Please re-think what you're doing.
> > > > > >
> > > > > > -Adrian
> > > > >
> > > > > Antwebsystems.com: Quality OFBiz services
> > for
> > > competitive
> > > > > rates
> > > > >
> > > > >
> > > >
> > > >
> > > >      
> > > --
> > > Antwebsystems.com: Quality OFBiz services for
> > competitive
> > > rates
> > >
> > >
> >
> >
> >
> >
>
>
>      
--
Antwebsystems.com: Quality OFBiz services for competitive rates