Jacopo Cappellato wrote:
I guess that the issue that Andrew faced was related to external components based on OFBiz: after the OFBiz upgrade they could not compile because they were using the original datetime methods (not timezone aware). If this is true, then maybe Adrian could help by providing an example to upgrade the old calls to the new ones (for bsh or for ftl etc...); I'm sure he already did this somewhere, but it is not always easy to track down where such information is.
If Andrew provided the code fragment that prompted him to add this method, then I would be more than happy to show him a better way to code it.
The Workeffort and Asset Maintenance calendars are two good examples of how to properly code date/time calculations. Look for day.bsh, week.bsh, month.bsh, and the getWorkEffortEventsByPeriod(...) method in WorkEffortServices.java.
In my opinion, adding the method for backward compatibility as Andrew did it is acceptable too, but I would suggest to deprecate it (and put an informative message in the deprecation worning to facilitate the migration) or at least add a warning message in the log: again, Adrian could help preparing these messages.
It's not a backward compatibility issue. Andrew's commit adds a method that's similar to one I created a few months ago. He's not restoring something that was taken away.
-Adrian
