[ create a new paste ] login | about

Link: http://codepad.org/KVnnYKe8    [ raw code | output | fork ]

PHP, pasted on May 22:
1
2
3
4
5
6
7
8
9
10
11
12
<?php
$current_date = date('d-M-Y g:i:s A');
echo $current_date."\n";
$current_time = strtotime($current_date);

$frac = 900;
$r = $current_time % $frac;

$new_time = $current_time + ($frac-$r);
$new_date = date('d-M-Y g:i:s A', $new_time);

echo $new_date."\n";


Output:
1
2
22-May-2014 11:45:53 AM
22-May-2014 12:00:00 PM


Create a new paste based on this one


Comments: