UNIX time to string

HI guys,

I have a unix timestamp: 7138 - the result of subtracting two timestamps and now I need to put it back to a string and pad it out with zeros so that I get: hh/mm/ss

if $resut is my timestamp (7138)

why can’t I do:

$readable = date(‘H:i:s’, $result);

when I echo this it comes out as:

20:58:58 but I know from using an online UNIX calculator that this should be:

01:58:58 :frowning: What am I doing wrong???

See this recent thread which had a very, very similar issue: http://www.sitepoint.com/forums/php-34/strftime-not-working-here-768289.html

Thankyou so much for your help. has been such a pain to sort this :wink: