I may have found a bug in date::manip version 5.54 where the business time function returns an incorrect value.
I have changed the configuration in (I only have one)
/usr/lib/perl5/vendor_perl
/5.8.8/Dat
e/Manip.pm
To the following
##########################
#######
# Start and end time of the work day (any time format allowed, seconds
# ignored)
$Cnf{"WorkDayBeg"}="09:00"
;
$Cnf{"WorkDayEnd"}="17:00"
;
##########################
##########
#
If I run the following
$review=&DateCalc("2008070
409:00:00"
, "- 2 business minute");
The result is
2008070315:01:00
I was expecting
2008070316:58:00
I'd be interested in feedback if I'm using the module incorrectly?
Alternatively I need a way to be able to subtract an amount of minutes from a timestamp and return the result as a timestamp that fits within a business working week and hours.
Thanks for your time.
Start Free Trial