There are times when you need a time stamp to be for a time that isn't right now. You may need to generate a date in the past or the future. You can use the mktime () function to create a timestamp for anytime. This is especially useful if you need to generate a date in the future to count down to. Read More.