in reply to How do I find difference between two timestamps?
Perl's DateTime modules provide an excellent way of dealing with dates and times. Your problem is very similar to one of DateTime's FAQs.
In Section
Seekers of Perl Wisdom
in reply to How do I find difference between two timestamps?