xRudeboiix Posted November 28, 2013 Posted November 28, 2013 (edited) im having problems with my time it shows it like this: The Time Is:November 28, 20136:05:14 pm. the code is print "<hr />The Time Is:";echo date ('<font color=Red>F j, Y</font>')."".date('<font color=white>g:i:s a</font>');echo'</white>';?> thanks Edited November 28, 2013 by xRudeboiix Quote
Script47 Posted November 28, 2013 Posted November 28, 2013 (edited) Function strtotime() Function date() Edited November 29, 2013 by Script47 Quote
xRudeboiix Posted November 28, 2013 Author Posted November 28, 2013 its the wrong time mate, i think thats usa time Quote
Guest Posted November 28, 2013 Posted November 28, 2013 Have you ever heard of http://php.net ? Might be a good starting point on using basic functions Quote
KyleMassacre Posted November 29, 2013 Posted November 29, 2013 (edited) Open wide, here comes the helicopter. /me makes chopper sound with lips print "<hr />The Time Is: " . date ("<font color=Red>F j, Y</font>") . " " . date("<font color=white>g:i:s a</font>");?> Edited November 29, 2013 by KyleMassacre corrected typo Quote
KyleMassacre Posted November 29, 2013 Posted November 29, 2013 Apparently it still works but it just looks kind of odd adding html tags inside your date function. But oh well Quote
Veramys Posted November 30, 2013 Posted November 30, 2013 its the wrong time mate, i think thats usa time Of course it shows US time. X10hosting is based in the US. Your code there is showing server time. Quote
Script47 Posted November 30, 2013 Posted November 30, 2013 Of course it shows US time. X10hosting is based in the US. Your code there is showing server time. He is correct, as PHP is a server side scripting language, it gets the server time, not the clients time. If you wish to show the clients time then use Javascript. Quote
Seker Posted November 30, 2013 Posted November 30, 2013 He is correct, as PHP is a server side scripting language, it gets the server time, not the clients time. If you wish to show the clients time then use Javascript. Or... date_default_timezone_set('America/Los_Angeles'); 1 Quote
Coly010 Posted December 14, 2013 Posted December 14, 2013 Open wide, here comes the helicopter. /me makes chopper sound with lips couldnt help but laugh when I read this!! Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.