<?php
#$a=getdate();
#var_dump($a);
?>
<form method="post" action="">
comment:<input type="text" name="comment"><br>
timestamp:<input type="text" name="timestamp"><br>
<input type="submit">
</form>
<hr>
<?php
if(isset($_POST["timestamp"]))
{
echo $_POST["timestamp"] . '<br>';
if(isset($_POST["comment"]))
{
echo $_POST["comment"]. '<br>';
}
$a=getdate($_POST["timestamp"]);
$hour=$a['hours']+8;
echo "{$a['year']}-{$a['mon']}-{$a['mday']} {$hour}:{$a['minutes']}:{$a['seconds']}";
}
?>
<hr>
<a href="date.php" target="_blank">new page</a>