Jump to content
MakeWebGames

Recommended Posts

  • 8 months later...
Posted

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

Posted

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');

Posted

Re: Time

put it to your host time for crons. if everone is having there PC time. Then friends might want to meat up at like 11pm game time but on 1 PC its 11pm and other 3am

Dunno how old this topic is.

  • 2 weeks later...
Posted

Re: Time

If you just want time at GMT, you can use gmdate().

If you want to show more than one timezone on one page, you can use floydian's suggestion of date_default_timezone_set and the function setTimezone to set timezones for date objects.

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