xRudeboiix Posted November 28, 2013 Share 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 Link to comment Share on other sites More sharing options...
Script47 Posted November 28, 2013 Share Posted November 28, 2013 (edited) Function strtotime() Function date() Edited November 29, 2013 by Script47 Quote Link to comment Share on other sites More sharing options...
xRudeboiix Posted November 28, 2013 Author Share Posted November 28, 2013 its the wrong time mate, i think thats usa time Quote Link to comment Share on other sites More sharing options...
Guest Posted November 28, 2013 Share Posted November 28, 2013 Have you ever heard of http://php.net ? Might be a good starting point on using basic functions Quote Link to comment Share on other sites More sharing options...
KyleMassacre Posted November 29, 2013 Share 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 Link to comment Share on other sites More sharing options...
xRudeboiix Posted November 29, 2013 Author Share Posted November 29, 2013 lol thanks Quote Link to comment Share on other sites More sharing options...
KyleMassacre Posted November 29, 2013 Share 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 Link to comment Share on other sites More sharing options...
Veramys Posted November 30, 2013 Share 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 Link to comment Share on other sites More sharing options...
Script47 Posted November 30, 2013 Share 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 Link to comment Share on other sites More sharing options...
Seker Posted November 30, 2013 Share 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 Link to comment Share on other sites More sharing options...
Coly010 Posted December 14, 2013 Share 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 Link to comment Share on other sites More sharing options...
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.