I have installed the Ultra Apps portal system.
http://www.ultraapps.com/freecommunitywebportal.html
My site is:
http://ukasian.co.uk
I have difficulty in changing the date formats to British (dd/mm/yy).
The code I think I need tol change is in common.php:
function now()
{
return date("Y-m-d G:i:s");
}
function vdate($ldate)
{
$ldate = str_replace(":","-",$ldate);
$ldate = str_replace(" ","-",$ldate);
list ($year, $month, $day, $hour, $minute) = explode("-", $ldate);
if ($newdate = mktime ($hour, $minute, 0, $month, $day, $year)) {
if (@date("H-i", $newdate) == "00-00")
return @date("m/d/y", $newdate);
else
return @date("m/d/y h:i A", $newdate);
}
}
function sdate($ldate)
{
list ($year, $month, $day, $hour, $minute) = explode("-", $ldate);
$newdate = mktime (0, 0, 0, $month, $day, $year);
return date("m/d/y", $newdate);
}
function datetodb($edate)
{
return date("Y-m-d H:i:s",strtotime($edate));
}
I have tried the simple things like changing m/d/y to d/m/y... This causes problems in save and retrive from database (changes numbers around).
The database is in MYSQL, Field is a standard DateTime.
Any help would be much appriciated.
Submit Your Article
Forum Rules

Reply With Quote