PHP - Converting Seconds to Minutes discrepancy
I'm running into a discrepancy with either my conversion of an integer
into defined Minutes.
<?php
$seconds = 269;
echo date("G:i:s", $seconds);
// result: 0:04:29
?>
I figured I'd double check on some sites to see if the conversion is correct:
Here's one I found: http://www.thecalculatorsite.com/conversions/time.php
The result returned is: 4.4833333333333
Example 1 returns: 0:04:29 Example 2 returns: 4.4833333333333
I'm confused about this. What am I missing here. Am I using the date()
function incorrectly?
No comments:
Post a Comment