Jump to content

Archived

This topic is now archived and is closed to further replies.

AV1611

compute time

Recommended Posts

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';
//

Share this post


Link to post
Share on other sites
<?
$back=date("h")-1;
$time=date("$back:i:s");

echo $time;
?>

Share this post


Link to post
Share on other sites
[code]<?php
$timestamp = mktime(0,0,1,date('m'),date('d'),date('Y'));
?>[/code]

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

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.