2007-05-20, 12:02 PM
2007-05-20, 03:45 PM
This depends on the php function date() and how the server is configured. If the server is confused to be an English server that's what it'll use to output.
2007-05-20, 07:58 PM
Thanks is there any other way to display correct. I saw something like that in SMF
2007-05-20, 08:38 PM
I think MyBB should implement translation of am/pm, and month names maybe. It isn't exactly too easy for the setlocale function to work correctly (as it requires usage of strftime). Better to use few str_replaces and convert them on the fly.
Anyways, dyrer, you just need it for am/pm right? Then try the following:
Open inc/functions.php and find:
Add below:
However, you'll have to make sure the text editor you're using is saving it in unicode utf-8 format.
Or another way is to find:
and replace with:
Not sure if second way will work good though.
Anyways, dyrer, you just need it for am/pm right? Then try the following:
Open inc/functions.php and find:
$plugins->run_hooks_by_ref("my_date", $date);
Add below:
$date = str_replace(array('am', 'pm'), array('πμ', 'μμ'), $date);
However, you'll have to make sure the text editor you're using is saving it in unicode utf-8 format.
Or another way is to find:
$date = gmdate($format, $stamp + ($offset * 3600));
and replace with:
setlocale(LC_TIME, 'el_GR.UTF-8', 'el_GR');
// code from ExoHelpDesk 1.3 in dev
$format = str_replace(
array('F', 'M', 'm','d', 'D', 'l', 'Y', 'y', 'H', 'h', 'i', 'a', 'A', 's'),
array('%B','%b','%m','%d','%a','%A','%Y','%y','%H','%I','%M','%p','%p', '%S'),
$format);
$date = gmstrftime($format, $stamp + ($offset * 3600));
Not sure if second way will work good though.