Jump to content
MakeWebGames

Recommended Posts

Posted (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 by xRudeboiix
Posted (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 by KyleMassacre
corrected typo
Posted
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.

Posted
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');
  • Like 1
  • 2 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...