You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by Adrian Crum <ad...@hlmksw.com> on 2007/08/01 17:36:55 UTC
Update: Apache OFBiz Time Zone Support Strategy
Just a quick update on this...
Step 3 is finished.
Step 4 is nearly complete. I submitted some patches to Jira
(https://issues.apache.org/jira/browse/OFBIZ-1164 and https://issues.apache.org/jira/browse/OFBIZ-1170).
I did the best I can do on OFBIZ-1164. Working on the service engine and other core code was a
little over my head. I have time zone support mostly working, but I've run into a brick wall. If
time zone support is to be included in the project, then someone with experience in the service
engine/rendering code needs to step in and help out.
Step 5 has begun with the Workeffort Calendar. A patch has been submitted to Jira
(https://issues.apache.org/jira/browse/OFBIZ-1089) that demonstrates how it all works. If you apply
the patches from OFBIZ-1089, OFBIZ-1164, and OFBIZ-1170 to your local copy, then you can see how
well the time zone support works in the Workeffort Calendar. The only problem is a few screens still
default to the server's time zone - which is caused by the unfinished work that I mentioned in Step 4.
At this point in time I've done all I can do. We just need someone to help with finishing the patch
in OFBIZ-1164, then have the patches in OFBIZ-1164 and OFBIZ-1170 committed.
-Adrian
Adrian Crum wrote:
> I'm starting a new thread for us to discuss the User-Selected Time Zone
> Support strategy. The previous thread regarding the Workeffort Calendar
> Progress started to expand into other subjects and strayed away from the
> original subject, so I thought it would be best if we separated the Time
> Zone support discussion into its own thread.
>
> My hope is that we can use this thread to brainstorm and come up with a
> general implementation strategy and maybe even assume/assign tasks to
> achieve the end result.
>
> *** The Goal: To have OFBiz support a user-selected time zone. Once a
> user has selected a time zone, nearly all of the date/time data will be
> displayed/entered referenced to that time zone. Some system date/time
> data may be excluded from this goal.
>
> In the Workeffort Calendar thread, there was some discussion about how
> the date/time data should be formatted. I propose we leave that detail
> out of this discussion so that we don't get diverted. How the date/time
> data is formatted doesn't affect this thread's goal or its strategy.
>
> *** The Strategy (Some of this has been implemented already - it is
> included here to make sure we're all on the same page) :
>
> 1. Provide a means for the user to select a time zone.
> 2. Persist the user's time zone selection and make a corresponding
> java.util.TimeZone object generally available
> 3. Provide a set of utility methods that take the user's TimeZone object
> as a parameter to perform date/time conversions, date/time arithmetic, etc.
> 4. Modify some of the low-level framework code to accept an optional
> TimeZone object, then pass that object on to the utility methods
> mentioned in #3. A typical example would be the simpleTypeConvert(...)
> method in ObjectType.java - where it handles Timestamp conversions.
> 5. Modify the higher-level code to call the low-level code using the
> user's TimeZone object. Replace embedded date/time
> conversions/arithmetic with utility method calls.
>
> Please feel free to comment on/add to the stragey items.
>
> Steps #1 and #2 have been implemented recently. (Btw, the patch in
> OFBIZ-1126 needs to be committed to fix a bug).
>
> Step #3 is partially implemented in the recent changes to
> UtilDateTime.java.
>
> Step #4 has not started yet. This step requires the expertise of
> developers who are skilled with the service engine, widgets, and such.
>
> Step #5 is the crucial one. Every step prior to this one will be
> backwards compatible. Step #5 is the "plunge forward" - we do it all or
> not at all.
>
> I'm thinking we can start off by discussing and improving upon this
> general strategy, then move on to specific tasks, etc. Let's hold off on
> starting Jira issues, etc until the community has had time to comment
> and reach a consensus.
>
> Comments are encouraged and welcome.
>
> -Adrian
>
>