devknob Posted August 10, 2012 Share Posted August 10, 2012 Hi. Im using gmdate to convert seconds to Days/Hours/Minutes/Seconds and its correct except for the number of days it calculates. Does anyone know why this would happen? $secs = 432000; // This is 5 days exact $time = gmdate('d:H:i:s',$secs); //This returns 06:00:00:00 when it should return 05:00:00:00 Does anyone know why this would happen? Link to comment https://forums.phpfreaks.com/topic/266919-using-gmdate-to-convert-seconds-to-user-friendly-time/ Share on other sites More sharing options...
PFMaBiSmAd Posted August 10, 2012 Share Posted August 10, 2012 A Unixtime stamp of zero is Jan 1, 1970. Adding 5 days of seconds to that would make it Jan 6, 1970. Link to comment https://forums.phpfreaks.com/topic/266919-using-gmdate-to-convert-seconds-to-user-friendly-time/#findComment-1368428 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.