function formatDate($val)
{
list($date, $time) = explode(" ", $val);
list($year, $month, $day) = explode("-", $date);
list($hour, $minute, $second) = explode (":", $time);
return date("l, m.j.y @ H:ia", mktime($hour, $minute, $second, $month, $day, $year));
There is nothing in that script that is set to language or timezone specific.
the dateformat is described fully in the online php manual at www.php.net
This script takes a date stored in a database by some slow thinking desgner(1) as a text string, breaks it and creates a manipulatable data set and returns a date.
What should happen is the database designer & programmer be fired.
then the database modified so that the data already stored is converted to a timestamp, and all future stored dates be stored as a timestamp
then the script is redundant and becomes
echo date("l, m.j.y @ H:ia", $val));
coding for language and regional date styles is just a matter of changing the date string, which can be in user config, by button, or in the code if the change is permanent
Note 1. I think he/she(designer/programmer) is a bleep idiot.