Quote:
Originally Posted by Backstabnoob
Yeah, I can do it with timestamp, just couldn't find that.
Can you show me an example of how to get the difference?
|
All you have to do is subtract one time from the other then divide by X to determine the difference in years, months, days, hours, minutes, seconds or w\e.
Use get_systime() in your plugin to get the current unix time.
Current time = 1276338840
5 hours from now = 1276356840
1276356840 - 1276338840 = 18000
MinuteSeconds = 60
HourSeconds = 3600
DaySeconds = 86400
18000 / 3600 = 5
__________________