in reply to Convert time in seconds to hh::mm::ss
Update: I saw in one of your replies that you only want hour:min:sec so my suggestion below is probably not what you want.
Meanwhile I also found that an earlier monk has already benchmarked several solutions to this problem.
You could use the core module Time::Seconds:
Output:#!/usr/bin/perl use strict; use warnings; use Time::Seconds; my $t = Time::Seconds->new( 12345678 ); print $t->pretty; __END__
142 days, 21 hours, 21 minutes, 18 seconds
Hope this helps!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Convert time in seconds to hh::mm::ss
by stevieb (Canon) on Mar 16, 2016 at 02:07 UTC | |
|
Re^2: Convert time in seconds to hh::mm::ss
by bangor (Monk) on Mar 16, 2016 at 02:02 UTC |