Jump to content
MakeWebGames

Time


Jameo

Recommended Posts

  • 8 months later...

Re: Time

get a VPS or dedicated server and your able to change your timezone, other than that you'll need to go to the link Luke posted www.php.net/date and change the format before it's outputted to the user

as for a clock set to the users time it's better to have a game clock that is set to the server time so that way people know when the new day is

Link to comment
Share on other sites

Re: Time

Timezone setting is a php ini setting believe it or not.

And if you don't have that php ini setting set (ie, you're depending on the servers time zone) then everytime you use a time/date function, you're getting E_NOTICE errors in PHP >= 5 (It might be like this in PHP 4, but don't quote me on that).

 

Here's how you set the time zone programatically:

// Time zone is set here.

date_default_timezone_set('America/New_York');

Link to comment
Share on other sites

  • 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...