PHP/Date/time
Содержание
Adding two days to the date
<?php
$timestamp= time( );
echo date("m/d/y G.i:s",$timestamp);
$seconds=2*24*60*60;
$timestamp+=$seconds;
echo "<br />new dates
is:";
echo date("m/d/y G.i:s",$timestamp);
?>
Another date interval with epoch timestamps
<?php
$now = time();
$next_week = $now + 7 * 86400;
?>
A simple echo of the timestamp
<?php
$timestamp= time( );
echo $timestamp;
?>
int time ( void ) gets the current time in epoch format is time( )
<?
print time( );
$CurrentTime = time( );
print $CurrentTime;
?>