Get Super users in Joomla

Joomla Get the full current URI

Joomla Cookie API

Some rules about $expire value

its a Unix tinestamp in seconds, like return value of time().
$expire == 0: cookie lifetime is of browser session.
$expire < time(): cookie is being deleted (expire set to past). You could remove cookie by setting it's value to null, but apparently IE fails to do so. Notes

Keep in mind that cookies should be set before headers are sent (usually before output is echoed).

Cookie key and value should be properly escaped

Non-string values

When serializing the value on set (like json_encode($dataNode)), remember to use proper filter to retrieve it later on. Default is cmd, which filters out pretty much anything but a-Z, 0-9 and cracks JSON structure.

Rererences

Joomla CMS github repository: JInputCookie::set (very well documented)
php docs: php.net/setcookie (developer experiences)
Wikipedia: HTTP Cookies (theory)

Joomla Date/Timezone

JFactory::getDate() will always stay in UTC. This is good for storing dates into the database and other calculations.

For displaying a date to a user, it is recommended to use JHtml::date(). This will automatically use your timezone setting.

JHtml::date('now', 'Y-m-d H:i:s');

For more information and to see the code behind this function: http://docs.joomla.org/API16:JHtml/date

Date Difference for PHP 5.2

Load Language file in Joomla

Read XLS/CSV file by PHPExcel