Re: Script to convert # of seconds to HH:mm

From: Date: Mon, 19 Mar 2001 22:47:46 +0000
Subject: Re: Script to convert # of seconds to HH:mm
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-44641@lists.php.net to get a copy of this message
Oh in addition this won't work accurately if $time is greater than about 2 billion(2147483648 I believe). -- phill ""Phillip Bow"" <philb@oreilly.com> wrote in message news:9961qg$ma4$1@toye.p.sourceforge.net... > function philtime($time){ > $hours = (int) ($time / 3600); > $min = (int) (($time % 3600) / 60 ); > return ("$hours:$min"); > } > Should be 3600 since: > 60sec = 1min > 60min = 1hour > 60 * 60 = 3600sec/hour > -- > phill

« previous php.general (#44641) next »