silverglade Posted July 21, 2008 Share Posted July 21, 2008 hi, got another newbie problem as i follow this book. i put in the following code $importantDate = mktime(0,0,0,1,15,2003) ."<br>"; echo $importantDate; and it outputs not the date, but this "1042617600" and i have no idea why, if anyone can help id greatly appreciate it. thanks. derek Link to comment https://forums.phpfreaks.com/topic/115857-solved-using-mktime/ Share on other sites More sharing options...
kenrbnsn Posted July 21, 2008 Share Posted July 21, 2008 The output of mktime() is a UNIX timestamp -- an integer that is the number of seconds since January 1, 1970. Ken Link to comment https://forums.phpfreaks.com/topic/115857-solved-using-mktime/#findComment-595640 Share on other sites More sharing options...
silverglade Posted July 21, 2008 Author Share Posted July 21, 2008 thanks very much ken. wow that is a strange function. hehe. thanks again for letting me know. derek Link to comment https://forums.phpfreaks.com/topic/115857-solved-using-mktime/#findComment-595674 Share on other sites More sharing options...
DarkWater Posted July 21, 2008 Share Posted July 21, 2008 It's not a strange function really. You can then use that timestamp for the date() function to get a nicely formatted date. Link to comment https://forums.phpfreaks.com/topic/115857-solved-using-mktime/#findComment-595684 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.