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

Facebooktwitterlinkedinby feather

Leave a Reply