Jump to content


Photo

*Server* time in seconds (since Jan. 1, 1970)


  • Please log in to reply
2 replies to this topic

#1 BDwinsAlt

BDwinsAlt
  • New Members
  • Pip
  • Newbie
  • 9 posts

Posted 07 October 2006 - 01:08 AM

How do I find the server time in seconds since Jan 1, 1970.  I have this bot that uses MySQL to store ban information and things like that.  Right now I am using the remote user's time to figure out the ban creation time, I need to use the server time.  Since the server time is not correct I use [servertime - 28940], how can I accuratly get the server time in seconds, and then subtract 28940 seconds from that?

#2 AndyB

AndyB
  • Staff Alumni
  • Advanced Member
  • 5,465 posts
  • LocationToronto

Posted 07 October 2006 - 01:10 AM

the time() function ... http://ca.php.net/ma...nction.time.php
Legend has it that reading the manual never killed anyone.
My site

#3 BDwinsAlt

BDwinsAlt
  • New Members
  • Pip
  • Newbie
  • 9 posts

Posted 07 October 2006 - 01:13 AM

Thats what I have now, I thought that was the user's time, not the server time.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users