- You can generate any time in the past or future that you want. One reason you may want to do this is to create a countdown. By generating the timestamp (in seconds) in the future and subtracting the current timestamp, you can calculate how much time remains before the future date will occur.
To generate the time in the future you will use the Mktime () function.
- If you are using this for a countdown, then you do not need to translate the seconds into a human friendly format. If however, you are using mktime for another reason, you can use the date () function with mktime the same way you would have used it with time ().