July 2010


We can use the below script to subtract half an hour from the given time in PHP.

<?php

date_default_timezone_set(‘UTC’);

$actualTime = strtotime(‘2010-07-28 15:00:00′);

$modifiedTime = $actualTime – strtotime(’00:30:00’);

echo “Modified time: ” . date(“H:i a”, $modifiedTime);

?>

Above script gives the output as

Modified time: 14:30 pm

Advertisements

We can add the following script to include the “Firebug” in any browser.

<script type=’text/javascript’ src=’http://getfirebug.com/releases/lite/1.2/firebug-lite-compressed.js‘></script>