In one of my tables, there is a time field which type is int(10) for Unix timestamp (for example: 1095242400 means 04:00)
Now if I want to add 10 minutes (or a variable $min) to this field, what should I use to perform this function?
Thank you!
simple math: there are 60 seconds in a minute 10 minutes is 600 seconds
$timestamp_plus_10 = $timestamp + 600;
Originally posted by devinemke simple math: there are 60 seconds in a minute 10 minutes is 600 seconds $timestamp_plus_10 = $timestamp + 600; [/B]
Originally posted by devinemke simple math: there are 60 seconds in a minute 10 minutes is 600 seconds
[/B]
Oh, sorry. I didn't know the Unix timestamp is calculated by sec.
thank you!
Originally posted by sunnyside I didn't know the Unix timestamp is calculated by sec.
that is precisely what a UNIX timestamp is: the number of seconds since 1970-01-01 00:00:00 GMT