mktime(21, 1, 33, 12, 8, 2009); // mktime($hours, $minutes, seconds, $month, $day, $year)
In addition, the mktime () function can also be used for this purpose. However, you need to provide parameters, but the advantage of this function is that you can get the timestamp for the desired date and time, and not just the current timestamp.
You also need to remove "0" from the beginning of the value. Otherwise, these values will be considered octal (08 => 8, 01 => 1).
source share