mktime() produces a GMT timestamp. : mktime « Date « PHP






mktime() produces a GMT timestamp.

 
<?php 
echo 'Output of mktime(): ' . mktime() . ".<br>\n"; 
echo 'Output of gmmktime(): ' . gmmktime() . ".<br>\n"; 
echo 'date/mktime: ' . date('r', mktime()) . ".<br>\n"; 
echo 'date/gmmktime: ' . date('r', gmmktime()) . ".<br>\n"; 
echo 'gmdate/mktime: ' . gmdate('r', mktime()) . ".<br>\n"; 
echo 'gmdate/gmmktime' . gmdate('r', gmmktime()) . ".<br>\n"; 

?>
  
  








Related examples in the same category

1.Calculating the difference between two dates
2.Checking credit card expiration
3.Creating a Timestamp with mktime()
4.Use mktime to create a time
5.Using mktime() and date()
6.int mktime ( [int hour [, int minute [, int second [, int month[, int day [, int year [, int is_dst]]]]]]] )
7.mktime.php
8.Making an epoch timestamp
9.Get the labor day