Syntax.
<?php mktime(hour, minute, second, month, day, year, is_dst); ?>
HERE,
mktime(…) : is the make php timestamp function
hour : is optional parameters , it denotes the number of hour
minute : is optional parameters, it denotes the number of minutes
second : is optional parameters, it denotes the number of seconds
month : is optional parameters, it denotes the number of the month
day : is optional parameters, it denotes the number of the day
year : is optional parameters, it denotes the number of the year
is_dst : is optional parameters, it is used to determine the day saving time (DST). 1 for DST, 0 if it is not and -1 if it is unknown.
Let’s have look at an example which creates a timestamp for the date 15/11/2030 using the mktime function.
<?php echo mktime(0,0,0,11,15,2030); ?>
HERE,
“0,0,0” is the hour, minute and seconds respectively.
“15” is the day of the month
“11” is the month of the year
“2030” is the year
Output:
1920931200