Scott Hamm wrote:
I'm trying to understand how mktime() function works. I've tried as follows:
<?
mktime($one,$two,$three,$four,$five,$six);
echo "<p>$one $two $three $four $five $six</p>\n"; ?>
What am I doing wrong?
Hi Scott,
mktime() creates a UNIX timestamp based on the arguments you give it ($hour, $minute, $second, $month, $day, $year, $is_dst) where $is_dst is a flag for daylight savings time, you can set it to 1 if the time is during daylight savings, 0 if not and -1 (the default) if you don't know (php will try to work it out).
So for eg if you want the timestamp for January 21st, 2004 at 12:30pm and 20 seconds you would do this:
<?php $time = mktime(12, 30, 20, 1, 21, 2004); echo $time; ?>
Hope this helps...
Cheers, Brad
--
|> Brad Kowalczyk
|> Web Developer
|> [EMAIL PROTECTED]
|> www.ibiscode.com
smime.p7s
Description: S/MIME Cryptographic Signature