Jump to content


PHP Clock, timestamping


4 replies to this topic

#1 Crab_com

    Young Padawan

  • Members
  • Pip
  • 2 posts

Posted 03 September 2007 - 01:22 AM

Hey all :D

think this is my first post not sure lol...

But yeah wondering if this is possible:

To create a php clock which you can time stamp off....

because the servers time isn't working correctly for our browser based game were creating so... we want to make a clock with we can time stamp the turns off...

If anyone can shed some light on how we would do this it would be great :P

Cheers, Crab

#2 evertonian7uk

    Young Padawan

  • Members
  • Pip
  • 249 posts

Posted 03 September 2007 - 04:05 AM

hi,

welcome to P2L :P

you need some cron files by the sounds of this,

then you have your DB run the cron command at any given time you set, be it 10 mins, 5 mins or 2 hours.

I have a lot of experience with crons and online games as i run a few, if you need help send me a PM with what you need and i'll be glad to help out.

do you have the crons made? if so, are you strugling to make the command run or struggling to convert real time to a time stamp??

let me know :D

#3 Mr. Matt

    Moderator

  • P2L Staff
  • PipPipPipPip
  • 1,945 posts
  • Gender:Not Telling

Posted 03 September 2007 - 05:58 AM

If your php time is off then contact your server hosts and get them to fix it.

Matt

#4 rc69

    PHP Master PD

  • P2L Staff
  • PipPipPipPip
  • 3,827 posts
  • Gender:Male
  • Location:Here
  • Interests:Web Development

Posted 03 September 2007 - 10:33 PM

Typically servers run off their local time. They don't know the clients time, that's why you have to use timezones to correct for it.

What i'm curious to know, is how time doesn't work correctly? I mean, time is time, regardless of what form it in...

#5 Crab_com

    Young Padawan

  • Members
  • Pip
  • 2 posts

Posted 06 September 2007 - 07:20 AM

sorry guys with the late post...

evertonian7uk...

me and my mate have got the time working but the time is delayed by 10 secs or so throwing off other calculations for the game....

:blink: might PM you later and we have a chat on msn :)

Cheers, crab





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users