I use the php time() function to insert the time into a database after a user posts on my site. I store this value as an int. I believe the time() function inputs the number of seconds since like 1970. I now want to get the current time so I can subtract the two and get the time since the user’s post. I have a two questions regarding this process:
- Does the time come from the user’s computer or somewhere on my server or somewhere else?
- Is the time function stored as an Int the best way to do this?
1 Answer