interesting PHP time format (need help :) )?

  • Thread starter Thread starter sax_master
  • Start date Start date
S

sax_master

Guest
well the only way i can think of would be to use that number to calculate how many days the clock has been running(number/1000/60/60/24), then take the decimal after that number and multiply that by 24 to get the hours, and you can also calculate the minutes by multiplying the decimal of that number by sixty. there will probably be an offset assuming that the clock measures how long the site has been online, you will have to figure that out yourself. good luck
 
i was just roaming around some webpages earlier when i came accross a file called x.php. i decided to open it up, and it gave me a number like this: 1253143381178, this number seems to increase by 1000 every 1 second, would there be a way to work out the current time from this? (this would be realy helpful for a project im doing if it is possible) (the file x.php was in a folder called "Clock", so im guessing it has something to do with the time)

Thanks
just done some more roaming around and found this to go with the php file.


60 * (time from server to php script (Milliseconds);
niceoffset=could be from 60milliseconds to 6000milliseconds
getUTCMilliseconds();

( this is what im guessing the offset is)
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
offset = time for time to reach php script from some place (which im not sure so cant ping for anything)
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
 
It looks like what you got is the current timestamp, or the number of milliseconds since the "Unix Epoch."

To use this in PHP to print an actual time, you would do this:

echo date("F j, Y at g:i:s AM",timestamp);

where timestamp was that big number you got.
This would print something like "September 16, 2009 at 7:52:25 PM".
 
Back
Top