Results 1 to 2 of 2
Thread: UNIX time to string
-
UNIX time to string
11 Jul 2011 @ 22.06 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
What am I doing wrong???
-
11 Jul 2011 @ 23.02 [SOLVED]
$result = gmstrftime ('%H:%M:%S', $result);
This overrides the timezones/offsets which were giving me the silly answers



LinkBack URL
About LinkBacks












What is Affiliate...
Hi, Affiliate is a really good way to earn. You just have to become a...