I am using the following to show the current date and time on a website:
$today = getdate();
$smarty->assign('current_time', $today['weekday'] . ' ' . $today['month'] . ' ' . $today['mday'] . ' ' . $today['year'] .' ' .$today['hours'] . ':' . $today['minutes']);
It works fine except for two things:
It shows for eg. 12:4 instead of 12:04
It doesn't account for daylight savings time
What can I do to rectify these problems?