Using the Joomla! configuration in an external script

From Joomla! Documentation

When you want to use the configuration of an existing Joomla! installation (perhaps because you have Joomla 1.5 loaded the Joomla! Framework from an external script), you need to load it from the configuration.php file. You can do this using the following code:

// Load Joomla! configuration file
// Create a JConfig object
$config = new JConfig();
// Use the object in a meaningful way
echo 'Your server is ' . $config->offset . ' hours ahead of GMT';