This module follows the principles I've made for myself when developing for OTRS, use the published extension points. This could probably be done simpler if I modified the modules displaying the pending time selectors.This module fixes the pending time if the ticket is answered on a non working day, or the pending date itself is placed on an non working day. If the new calculated Pending date is outside the lifetime of the session, this functionality is bypassed, as it is assumed that the pending date have been changed on purpose. Basically it will only take effect if the automatic pending date comes on a non working day/hour.
It calculates the difference in days, and working hours. And uses the 'DestinationTime' method from the 'Kernel::System::Ticket' module to place it on a correct day. It uses 'Monday' as the day to calculate the working hours, from the tickets queue calendar.
Hope you like it, and let me know if there is anything you would like me to change or add.
The module can be found at http://opar.perl-services.de/dist/PendingFix-1.0.0