PHP/Date/gmmktime

Материал из Web эксперт
Перейти к: навигация, поиск

Epoch timestamps and gmmktime()

 
<?php
$stamp_future = gmmktime(15,25,0,6,4,2012);
print $stamp_future;
print strftime("%c",$stamp_future);



Getting a specific GMT-based epoch timestamp

 
<?php
$then = gmmktime(19,45,3,3,10,1975);
?>



gmmktime and mktime

 
<?php 
echo "Output of <code>mktime()</code>: " . mktime() . ".<br>\n"; 
echo "Output of <code>gmmktime()</code>: " . gmmktime() . ".<br>\n"; 
echo "Local time zone: " . date("O") . ".<br>\n"; 
?>