Jump to content


Photo

Timestamp generation


  • Please log in to reply
2 replies to this topic

#1 markduce

markduce
  • Members
  • PipPip
  • Member
  • 22 posts

Posted 24 July 2006 - 10:26 AM

OK, I have all the details about a point in time, I am just unsure how to turn it all into a Unix timestamp.

Can anyone help me out?

<?
$day="02";
$month="04";
$year="2006";
$hours="09";
$mins="50";
?>

Thanks in advance

#2 king arthur

king arthur
  • Members
  • PipPipPip
  • Advanced Member
  • 335 posts
  • LocationUK HQ

Posted 24 July 2006 - 10:29 AM

Use mktime($hours, $mins, $seconds, $day, $month, $year). (Or zero out any of the parameters, e.g. for zero seconds, mktime($hours, $mins, 0, $day, $month, $year) )
Sir Isaac Newton said "If I have seen farther, it is by standing on the shoulders of giants". But it is not recorded as to whether he said it before or after he was hit on the head by a falling apple.

#3 markduce

markduce
  • Members
  • PipPip
  • Member
  • 22 posts

Posted 24 July 2006 - 10:30 AM

Cheers




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users