Recently I found myself having to convert an integer value (representing a number of seconds) into DD:HH:MM:SSNumber of seconds ... since when?
This question is relevant, because your colleague's solution uses Date::Calc::Delta_DHMS(), whose documentation describes it as follows:
This function returns the difference in days, hours, minutes and seconds between the two given dates with times.If your problem really involves the difference between two points in time, then your colleague's solution is a valid hack ... though I suspect other monks could come up with a shorter solution. But if it does not involve a difference, then I don't see why localtime could not have been used.
Another point, before trying to compare the efficiency of your colleague's solution vs your own (which certainly looks simple), write some tests to make sure each is doing what you intend.
Jim Keenan
In reply to Re: Converting seconds to DD:HH:MM:SS
by jkeenan1
in thread Converting seconds to DD:HH:MM:SS
by McDarren
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |