Jump to content


Photo

compute time


  • Please log in to reply
3 replies to this topic

#1 AV1611

AV1611
  • Members
  • PipPipPip
  • Advanced Member
  • 997 posts

Posted 10 July 2006 - 01:51 PM

I know that strtotime("-4 hours") will give me unix time for four hours ago,
but how would you find unix time for 1 sec after midnight of the current day?
I think this will give me the time string, but how to convert it to unix time?
$today=(Y.m.d);
$tminus4=$today.' 00:00:00';
//

#2 redarrow

redarrow
  • Members
  • PipPipPip
  • Advanced Member
  • 7,308 posts
  • Locationlondon

Posted 10 July 2006 - 01:56 PM

<?
$back=date("h")-1;
$time=date("$back:i:s");

echo $time;
?>

Wish i new all about php DAM i will have to learn
((EMAIL CODE THAT WORKS))
http://simpleforum.ath.cx/mail2.inc
((PAYPAL INTEGRATION THAT WORKS))
http://simpleforum.a...aypal1_info.inc

#3 Daniel0

Daniel0
  • Staff Alumni
  • Advanced Member
  • 11,956 posts

Posted 10 July 2006 - 02:22 PM

<?php
$timestamp = mktime(0,0,1,date('m'),date('d'),date('Y'));
?>

Edit: I read wrong, I thought you said before and not after.

#4 AV1611

AV1611
  • Members
  • PipPipPip
  • Advanced Member
  • 997 posts

Posted 10 July 2006 - 02:36 PM

My Heros...




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users